{"action":"created","comment":{"url":"https://api.github.com/repos/andela/codango/pulls/comments/88214160","pull_request_review_id":8785050,"id":88214160,"diff_hunk":"@@ -1,27 +1,30 @@\n from django.test import TestCase\n-from django.contrib.auth.models import User\n from userprofile.models import UserProfile, Language, Notification\n+from userprofile.tests.factories import \\\n+    UserProfileFactory, LanguageFactory, NotificationFactory\n \n \n class ProfileTestModels(TestCase):\n \n     def setUp(self):\n-        self.user = User.objects.create(\n-            username='adebola', password='adebolu')\n-        self.language = Language.objects.create(name=\"Python\", user=self.user)\n-        self.notification = Notification.objects.create(content=\"Python\",\n-                                                        user=self.user, read=False, link=\"link\",\n-                                                        activity_type=\"Vote\")\n+        self.language_factory = LanguageFactory()","path":"codango/userprofile/tests/test_models.py","position":17,"original_position":17,"commit_id":"3b6fc64e8e113b463651ed4db4759211c44f9713","original_commit_id":"3b6fc64e8e113b463651ed4db4759211c44f9713","user":{"login":"andela-cobiora","id":8373338,"avatar_url":"https://avatars.githubusercontent.com/u/8373338?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-cobiora","html_url":"https://github.com/andela-cobiora","followers_url":"https://api.github.com/users/andela-cobiora/followers","following_url":"https://api.github.com/users/andela-cobiora/following{/other_user}","gists_url":"https://api.github.com/users/andela-cobiora/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-cobiora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-cobiora/subscriptions","organizations_url":"https://api.github.com/users/andela-cobiora/orgs","repos_url":"https://api.github.com/users/andela-cobiora/repos","events_url":"https://api.github.com/users/andela-cobiora/events{/privacy}","received_events_url":"https://api.github.com/users/andela-cobiora/received_events","type":"User","site_admin":false},"body":"`LanguageFactory` creates `language`\r\n`NotificationFactory` creates `notification`","created_at":"2016-11-16T11:02:23Z","updated_at":"2016-11-16T11:06:22Z","html_url":"https://github.com/andela/codango/pull/170#discussion_r88214160","pull_request_url":"https://api.github.com/repos/andela/codango/pulls/170","_links":{"self":{"href":"https://api.github.com/repos/andela/codango/pulls/comments/88214160"},"html":{"href":"https://github.com/andela/codango/pull/170#discussion_r88214160"},"pull_request":{"href":"https://api.github.com/repos/andela/codango/pulls/170"}}},"pull_request":{"url":"https://api.github.com/repos/andela/codango/pulls/170","id":93570186,"html_url":"https://github.com/andela/codango/pull/170","diff_url":"https://github.com/andela/codango/pull/170.diff","patch_url":"https://github.com/andela/codango/pull/170.patch","issue_url":"https://api.github.com/repos/andela/codango/issues/170","number":170,"state":"open","locked":false,"title":"#132569407 Create factories for the other half of models","user":{"login":"andela-jkamau","id":20517534,"avatar_url":"https://avatars.githubusercontent.com/u/20517534?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jkamau","html_url":"https://github.com/andela-jkamau","followers_url":"https://api.github.com/users/andela-jkamau/followers","following_url":"https://api.github.com/users/andela-jkamau/following{/other_user}","gists_url":"https://api.github.com/users/andela-jkamau/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jkamau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jkamau/subscriptions","organizations_url":"https://api.github.com/users/andela-jkamau/orgs","repos_url":"https://api.github.com/users/andela-jkamau/repos","events_url":"https://api.github.com/users/andela-jkamau/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jkamau/received_events","type":"User","site_admin":false},"body":"## What does this PR do?\r\n\r\nCreate factories for models (Account, PairProgram, UserProfile) and refactor the models' tests.\r\n## Description of Task to be completed?\r\n\r\nCreate factories for models and refactor the affected tests\r\n## How should this be manually tested?\r\n\r\nClone the branch `git clone https://github.com/andela/codango.git`\r\nInstall the requirements `pip install requirements.txt`\r\nNavigate into the directory `cd codango`\r\nRun the  tests `python manage.py test`\r\n\r\n## What are the relevant pivotal tracker stories?\r\n\r\n#132569407 - Create factories for the other half of models\r\n","created_at":"2016-11-14T13:55:32Z","updated_at":"2016-11-16T11:06:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46c1007eea465dc5d54f77f51e062cfeaefaf0f2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/codango/pulls/170/commits","review_comments_url":"https://api.github.com/repos/andela/codango/pulls/170/comments","review_comment_url":"https://api.github.com/repos/andela/codango/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/codango/issues/170/comments","statuses_url":"https://api.github.com/repos/andela/codango/statuses/3b6fc64e8e113b463651ed4db4759211c44f9713","head":{"label":"andela:ft-create-factories-for-models-132569407","ref":"ft-create-factories-for-models-132569407","sha":"3b6fc64e8e113b463651ed4db4759211c44f9713","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":40593971,"name":"codango","full_name":"andela/codango","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/codango","description":"Social Network for Coders","fork":false,"url":"https://api.github.com/repos/andela/codango","forks_url":"https://api.github.com/repos/andela/codango/forks","keys_url":"https://api.github.com/repos/andela/codango/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/codango/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/codango/teams","hooks_url":"https://api.github.com/repos/andela/codango/hooks","issue_events_url":"https://api.github.com/repos/andela/codango/issues/events{/number}","events_url":"https://api.github.com/repos/andela/codango/events","assignees_url":"https://api.github.com/repos/andela/codango/assignees{/user}","branches_url":"https://api.github.com/repos/andela/codango/branches{/branch}","tags_url":"https://api.github.com/repos/andela/codango/tags","blobs_url":"https://api.github.com/repos/andela/codango/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/codango/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/codango/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/codango/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/codango/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/codango/languages","stargazers_url":"https://api.github.com/repos/andela/codango/stargazers","contributors_url":"https://api.github.com/repos/andela/codango/contributors","subscribers_url":"https://api.github.com/repos/andela/codango/subscribers","subscription_url":"https://api.github.com/repos/andela/codango/subscription","commits_url":"https://api.github.com/repos/andela/codango/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/codango/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/codango/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/codango/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/codango/contents/{+path}","compare_url":"https://api.github.com/repos/andela/codango/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/codango/merges","archive_url":"https://api.github.com/repos/andela/codango/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/codango/downloads","issues_url":"https://api.github.com/repos/andela/codango/issues{/number}","pulls_url":"https://api.github.com/repos/andela/codango/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/codango/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/codango/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/codango/labels{/name}","releases_url":"https://api.github.com/repos/andela/codango/releases{/id}","deployments_url":"https://api.github.com/repos/andela/codango/deployments","created_at":"2015-08-12T10:04:41Z","updated_at":"2016-10-24T12:39:56Z","pushed_at":"2016-11-15T08:53:07Z","git_url":"git://github.com/andela/codango.git","ssh_url":"git@github.com:andela/codango.git","clone_url":"https://github.com/andela/codango.git","svn_url":"https://github.com/andela/codango","homepage":"","size":38796,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":8,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"e8c6baa9e80f99b65d5cc3a673598683b1d6fb9c","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":40593971,"name":"codango","full_name":"andela/codango","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/codango","description":"Social Network for Coders","fork":false,"url":"https://api.github.com/repos/andela/codango","forks_url":"https://api.github.com/repos/andela/codango/forks","keys_url":"https://api.github.com/repos/andela/codango/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/codango/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/codango/teams","hooks_url":"https://api.github.com/repos/andela/codango/hooks","issue_events_url":"https://api.github.com/repos/andela/codango/issues/events{/number}","events_url":"https://api.github.com/repos/andela/codango/events","assignees_url":"https://api.github.com/repos/andela/codango/assignees{/user}","branches_url":"https://api.github.com/repos/andela/codango/branches{/branch}","tags_url":"https://api.github.com/repos/andela/codango/tags","blobs_url":"https://api.github.com/repos/andela/codango/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/codango/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/codango/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/codango/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/codango/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/codango/languages","stargazers_url":"https://api.github.com/repos/andela/codango/stargazers","contributors_url":"https://api.github.com/repos/andela/codango/contributors","subscribers_url":"https://api.github.com/repos/andela/codango/subscribers","subscription_url":"https://api.github.com/repos/andela/codango/subscription","commits_url":"https://api.github.com/repos/andela/codango/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/codango/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/codango/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/codango/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/codango/contents/{+path}","compare_url":"https://api.github.com/repos/andela/codango/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/codango/merges","archive_url":"https://api.github.com/repos/andela/codango/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/codango/downloads","issues_url":"https://api.github.com/repos/andela/codango/issues{/number}","pulls_url":"https://api.github.com/repos/andela/codango/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/codango/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/codango/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/codango/labels{/name}","releases_url":"https://api.github.com/repos/andela/codango/releases{/id}","deployments_url":"https://api.github.com/repos/andela/codango/deployments","created_at":"2015-08-12T10:04:41Z","updated_at":"2016-10-24T12:39:56Z","pushed_at":"2016-11-15T08:53:07Z","git_url":"git://github.com/andela/codango.git","ssh_url":"git@github.com:andela/codango.git","clone_url":"https://github.com/andela/codango.git","svn_url":"https://github.com/andela/codango","homepage":"","size":38796,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":8,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/codango/pulls/170"},"html":{"href":"https://github.com/andela/codango/pull/170"},"issue":{"href":"https://api.github.com/repos/andela/codango/issues/170"},"comments":{"href":"https://api.github.com/repos/andela/codango/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/codango/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/codango/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/codango/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/andela/codango/statuses/3b6fc64e8e113b463651ed4db4759211c44f9713"}}}}
{"actor":{"display_login":"andela-cobiora"}}