{"action":"created","comment":{"url":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/comments/174148634","pull_request_review_id":103450857,"id":174148634,"diff_hunk":"@@ -1,7 +1,9 @@\n from django.test import TestCase\n from django.contrib.auth import get_user_model\n+from rest_framework.test import APIClient\n \n User = get_user_model()\n+client = APIClient()\n \n \n class UserTestCase(TestCase):","path":"api/tests/test_user.py","position":9,"original_position":9,"commit_id":"5883c6fe769bf9e0ade5b26ab867810838d76860","original_commit_id":"5883c6fe769bf9e0ade5b26ab867810838d76860","user":{"login":"alexkiura","id":17288133,"avatar_url":"https://avatars2.githubusercontent.com/u/17288133?v=4","gravatar_id":"","url":"https://api.github.com/users/alexkiura","html_url":"https://github.com/alexkiura","followers_url":"https://api.github.com/users/alexkiura/followers","following_url":"https://api.github.com/users/alexkiura/following{/other_user}","gists_url":"https://api.github.com/users/alexkiura/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkiura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkiura/subscriptions","organizations_url":"https://api.github.com/users/alexkiura/orgs","repos_url":"https://api.github.com/users/alexkiura/repos","events_url":"https://api.github.com/users/alexkiura/events{/privacy}","received_events_url":"https://api.github.com/users/alexkiura/received_events","type":"User","site_admin":false},"body":"Let's also add tests to ensure that only `POST` & `GET` are allowed for this endpoint.","created_at":"2018-03-13T14:22:56Z","updated_at":"2018-03-13T14:23:08Z","html_url":"https://github.com/AndelaOSP/art-backend/pull/38#discussion_r174148634","pull_request_url":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/38","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/comments/174148634"},"html":{"href":"https://github.com/AndelaOSP/art-backend/pull/38#discussion_r174148634"},"pull_request":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/38","id":174600744,"html_url":"https://github.com/AndelaOSP/art-backend/pull/38","diff_url":"https://github.com/AndelaOSP/art-backend/pull/38.diff","patch_url":"https://github.com/AndelaOSP/art-backend/pull/38.patch","issue_url":"https://api.github.com/repos/AndelaOSP/art-backend/issues/38","number":38,"state":"open","locked":false,"title":"[#155512172] Users can be created from an API endpoint","user":{"login":"iankigen","id":24381733,"avatar_url":"https://avatars0.githubusercontent.com/u/24381733?v=4","gravatar_id":"","url":"https://api.github.com/users/iankigen","html_url":"https://github.com/iankigen","followers_url":"https://api.github.com/users/iankigen/followers","following_url":"https://api.github.com/users/iankigen/following{/other_user}","gists_url":"https://api.github.com/users/iankigen/gists{/gist_id}","starred_url":"https://api.github.com/users/iankigen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iankigen/subscriptions","organizations_url":"https://api.github.com/users/iankigen/orgs","repos_url":"https://api.github.com/users/iankigen/repos","events_url":"https://api.github.com/users/iankigen/events{/privacy}","received_events_url":"https://api.github.com/users/iankigen/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n\r\nAllow users to be created from an API endpoint\r\n\r\n#### Description of Task to be completed?\r\n\r\n- add test for functionality\r\n- add user serializer\r\n- add user viewset\r\n- add user url patterns\r\n\r\n#### How should this be manually tested?\r\n\r\n`python manage.py test`\r\nor \r\nendpoint `/api/v1/user` in your browser\r\n\r\n#### Any background context you want to provide?\r\n\r\nonly admin user can add users\r\n#### What are the relevant pivotal tracker stories?\r\n\r\n[#155512172](https://www.pivotaltracker.com/n/projects/2146417/stories/155512172)\r\n\r\n#### Screenshots \r\n![users](https://user-images.githubusercontent.com/24381733/37333346-2d4ee09c-26ba-11e8-9ee3-ad91d8d7fe40.jpg)\r\n\r\n","created_at":"2018-03-13T09:30:31Z","updated_at":"2018-03-13T14:23:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60a4fea5c966ed5ffe717ef6f4fa5793222d7d24","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/38/commits","review_comments_url":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/38/comments","review_comment_url":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AndelaOSP/art-backend/issues/38/comments","statuses_url":"https://api.github.com/repos/AndelaOSP/art-backend/statuses/5883c6fe769bf9e0ade5b26ab867810838d76860","head":{"label":"AndelaOSP:ft-api-endpoint-create-user-155512172","ref":"ft-api-endpoint-create-user-155512172","sha":"5883c6fe769bf9e0ade5b26ab867810838d76860","user":{"login":"AndelaOSP","id":22083364,"avatar_url":"https://avatars1.githubusercontent.com/u/22083364?v=4","gravatar_id":"","url":"https://api.github.com/users/AndelaOSP","html_url":"https://github.com/AndelaOSP","followers_url":"https://api.github.com/users/AndelaOSP/followers","following_url":"https://api.github.com/users/AndelaOSP/following{/other_user}","gists_url":"https://api.github.com/users/AndelaOSP/gists{/gist_id}","starred_url":"https://api.github.com/users/AndelaOSP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndelaOSP/subscriptions","organizations_url":"https://api.github.com/users/AndelaOSP/orgs","repos_url":"https://api.github.com/users/AndelaOSP/repos","events_url":"https://api.github.com/users/AndelaOSP/events{/privacy}","received_events_url":"https://api.github.com/users/AndelaOSP/received_events","type":"Organization","site_admin":false},"repo":{"id":118765259,"name":"art-backend","full_name":"AndelaOSP/art-backend","owner":{"login":"AndelaOSP","id":22083364,"avatar_url":"https://avatars1.githubusercontent.com/u/22083364?v=4","gravatar_id":"","url":"https://api.github.com/users/AndelaOSP","html_url":"https://github.com/AndelaOSP","followers_url":"https://api.github.com/users/AndelaOSP/followers","following_url":"https://api.github.com/users/AndelaOSP/following{/other_user}","gists_url":"https://api.github.com/users/AndelaOSP/gists{/gist_id}","starred_url":"https://api.github.com/users/AndelaOSP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndelaOSP/subscriptions","organizations_url":"https://api.github.com/users/AndelaOSP/orgs","repos_url":"https://api.github.com/users/AndelaOSP/repos","events_url":"https://api.github.com/users/AndelaOSP/events{/privacy}","received_events_url":"https://api.github.com/users/AndelaOSP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AndelaOSP/art-backend","description":"This is the backend application for ART(Andela Resource Tracker)","fork":false,"url":"https://api.github.com/repos/AndelaOSP/art-backend","forks_url":"https://api.github.com/repos/AndelaOSP/art-backend/forks","keys_url":"https://api.github.com/repos/AndelaOSP/art-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndelaOSP/art-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndelaOSP/art-backend/teams","hooks_url":"https://api.github.com/repos/AndelaOSP/art-backend/hooks","issue_events_url":"https://api.github.com/repos/AndelaOSP/art-backend/issues/events{/number}","events_url":"https://api.github.com/repos/AndelaOSP/art-backend/events","assignees_url":"https://api.github.com/repos/AndelaOSP/art-backend/assignees{/user}","branches_url":"https://api.github.com/repos/AndelaOSP/art-backend/branches{/branch}","tags_url":"https://api.github.com/repos/AndelaOSP/art-backend/tags","blobs_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndelaOSP/art-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/AndelaOSP/art-backend/languages","stargazers_url":"https://api.github.com/repos/AndelaOSP/art-backend/stargazers","contributors_url":"https://api.github.com/repos/AndelaOSP/art-backend/contributors","subscribers_url":"https://api.github.com/repos/AndelaOSP/art-backend/subscribers","subscription_url":"https://api.github.com/repos/AndelaOSP/art-backend/subscription","commits_url":"https://api.github.com/repos/AndelaOSP/art-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndelaOSP/art-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndelaOSP/art-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndelaOSP/art-backend/contents/{+path}","compare_url":"https://api.github.com/repos/AndelaOSP/art-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndelaOSP/art-backend/merges","archive_url":"https://api.github.com/repos/AndelaOSP/art-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndelaOSP/art-backend/downloads","issues_url":"https://api.github.com/repos/AndelaOSP/art-backend/issues{/number}","pulls_url":"https://api.github.com/repos/AndelaOSP/art-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/AndelaOSP/art-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/AndelaOSP/art-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndelaOSP/art-backend/labels{/name}","releases_url":"https://api.github.com/repos/AndelaOSP/art-backend/releases{/id}","deployments_url":"https://api.github.com/repos/AndelaOSP/art-backend/deployments","created_at":"2018-01-24T12:53:21Z","updated_at":"2018-03-12T23:49:01Z","pushed_at":"2018-03-13T14:10:13Z","git_url":"git://github.com/AndelaOSP/art-backend.git","ssh_url":"git@github.com:AndelaOSP/art-backend.git","clone_url":"https://github.com/AndelaOSP/art-backend.git","svn_url":"https://github.com/AndelaOSP/art-backend","homepage":null,"size":59,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":2,"watchers":1,"default_branch":"develop"}},"base":{"label":"AndelaOSP:develop","ref":"develop","sha":"7c34e8b7ccaf6e0e39ed20bdf94cc85a401d0df9","user":{"login":"AndelaOSP","id":22083364,"avatar_url":"https://avatars1.githubusercontent.com/u/22083364?v=4","gravatar_id":"","url":"https://api.github.com/users/AndelaOSP","html_url":"https://github.com/AndelaOSP","followers_url":"https://api.github.com/users/AndelaOSP/followers","following_url":"https://api.github.com/users/AndelaOSP/following{/other_user}","gists_url":"https://api.github.com/users/AndelaOSP/gists{/gist_id}","starred_url":"https://api.github.com/users/AndelaOSP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndelaOSP/subscriptions","organizations_url":"https://api.github.com/users/AndelaOSP/orgs","repos_url":"https://api.github.com/users/AndelaOSP/repos","events_url":"https://api.github.com/users/AndelaOSP/events{/privacy}","received_events_url":"https://api.github.com/users/AndelaOSP/received_events","type":"Organization","site_admin":false},"repo":{"id":118765259,"name":"art-backend","full_name":"AndelaOSP/art-backend","owner":{"login":"AndelaOSP","id":22083364,"avatar_url":"https://avatars1.githubusercontent.com/u/22083364?v=4","gravatar_id":"","url":"https://api.github.com/users/AndelaOSP","html_url":"https://github.com/AndelaOSP","followers_url":"https://api.github.com/users/AndelaOSP/followers","following_url":"https://api.github.com/users/AndelaOSP/following{/other_user}","gists_url":"https://api.github.com/users/AndelaOSP/gists{/gist_id}","starred_url":"https://api.github.com/users/AndelaOSP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndelaOSP/subscriptions","organizations_url":"https://api.github.com/users/AndelaOSP/orgs","repos_url":"https://api.github.com/users/AndelaOSP/repos","events_url":"https://api.github.com/users/AndelaOSP/events{/privacy}","received_events_url":"https://api.github.com/users/AndelaOSP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AndelaOSP/art-backend","description":"This is the backend application for ART(Andela Resource Tracker)","fork":false,"url":"https://api.github.com/repos/AndelaOSP/art-backend","forks_url":"https://api.github.com/repos/AndelaOSP/art-backend/forks","keys_url":"https://api.github.com/repos/AndelaOSP/art-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndelaOSP/art-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndelaOSP/art-backend/teams","hooks_url":"https://api.github.com/repos/AndelaOSP/art-backend/hooks","issue_events_url":"https://api.github.com/repos/AndelaOSP/art-backend/issues/events{/number}","events_url":"https://api.github.com/repos/AndelaOSP/art-backend/events","assignees_url":"https://api.github.com/repos/AndelaOSP/art-backend/assignees{/user}","branches_url":"https://api.github.com/repos/AndelaOSP/art-backend/branches{/branch}","tags_url":"https://api.github.com/repos/AndelaOSP/art-backend/tags","blobs_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndelaOSP/art-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/AndelaOSP/art-backend/languages","stargazers_url":"https://api.github.com/repos/AndelaOSP/art-backend/stargazers","contributors_url":"https://api.github.com/repos/AndelaOSP/art-backend/contributors","subscribers_url":"https://api.github.com/repos/AndelaOSP/art-backend/subscribers","subscription_url":"https://api.github.com/repos/AndelaOSP/art-backend/subscription","commits_url":"https://api.github.com/repos/AndelaOSP/art-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndelaOSP/art-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndelaOSP/art-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndelaOSP/art-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndelaOSP/art-backend/contents/{+path}","compare_url":"https://api.github.com/repos/AndelaOSP/art-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndelaOSP/art-backend/merges","archive_url":"https://api.github.com/repos/AndelaOSP/art-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndelaOSP/art-backend/downloads","issues_url":"https://api.github.com/repos/AndelaOSP/art-backend/issues{/number}","pulls_url":"https://api.github.com/repos/AndelaOSP/art-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/AndelaOSP/art-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/AndelaOSP/art-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndelaOSP/art-backend/labels{/name}","releases_url":"https://api.github.com/repos/AndelaOSP/art-backend/releases{/id}","deployments_url":"https://api.github.com/repos/AndelaOSP/art-backend/deployments","created_at":"2018-01-24T12:53:21Z","updated_at":"2018-03-12T23:49:01Z","pushed_at":"2018-03-13T14:10:13Z","git_url":"git://github.com/AndelaOSP/art-backend.git","ssh_url":"git@github.com:AndelaOSP/art-backend.git","clone_url":"https://github.com/AndelaOSP/art-backend.git","svn_url":"https://github.com/AndelaOSP/art-backend","homepage":null,"size":59,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":2,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/38"},"html":{"href":"https://github.com/AndelaOSP/art-backend/pull/38"},"issue":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/issues/38"},"comments":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/AndelaOSP/art-backend/statuses/5883c6fe769bf9e0ade5b26ab867810838d76860"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"alexkiura"}}