{"action":"created","comment":{"url":"https://api.github.com/repos/ubyssey/dispatch/pulls/comments/112032778","pull_request_review_id":33316965,"id":112032778,"diff_hunk":"@@ -0,0 +1,226 @@\n+from django.core.urlresolvers import reverse\n+\n+from rest_framework import status\n+\n+from dispatch.tests.cases import DispatchAPITestCase\n+\n+from dispatch.apps.content.models import Page\n+\n+class PagesTest(DispatchAPITestCase):\n+\n+    def _create_page(self):\n+        \"\"\"\n+        Create Dummy Page\n+        \"\"\"\n+\n+        url = reverse('api-pages-list')\n+\n+        data = {\n+          \"title\": \"Test Page\",\n+          \"slug\": \"test-page\",\n+          \"snippet\": \"This is a test snippet\",\n+          \"content\": [\n+            {\n+              \"type\": \"paragraph\",\n+              \"data\": \"This is some paragraph text\"\n+            }\n+          ]\n+        }\n+\n+        return self.client.post(url, data, format='json')\n+\n+    def test_create_page_unauthorized(self):\n+        \"\"\"\n+        Create page while unauthorized should fail with unauthenticated request\n+        \"\"\"\n+        # Clear authentication credentials\n+        self.client.credentials()\n+\n+        url = reverse('api-pages-list')\n+\n+        data = {\n+          \"title\": \"Test Page\",\n+          \"slug\": \"test-page\",\n+          \"snippet\": \"This is a test snippet\",\n+          \"content\": [\n+            {\n+              \"type\": \"paragraph\",\n+              \"data\": \"This is some paragraph text\"\n+            }\n+          ]\n+        }\n+\n+        response = self.client.post(url, data, format='json')\n+\n+        self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)\n+\n+    def test_create_empty_page(self):\n+        \"\"\"\n+        Create page should fail with empty payload\n+        \"\"\"\n+\n+        url = reverse('api-pages-list')\n+\n+        self._create_page()","path":"dispatch/tests/test_api_pages.py","position":64,"original_position":64,"commit_id":"2c0e685c66dba0d245f30b366fbb8f56f5d4eeb6","original_commit_id":"2c0e685c66dba0d245f30b366fbb8f56f5d4eeb6","user":{"login":"psiemens","id":2547035,"avatar_url":"https://avatars2.githubusercontent.com/u/2547035?v=3","gravatar_id":"","url":"https://api.github.com/users/psiemens","html_url":"https://github.com/psiemens","followers_url":"https://api.github.com/users/psiemens/followers","following_url":"https://api.github.com/users/psiemens/following{/other_user}","gists_url":"https://api.github.com/users/psiemens/gists{/gist_id}","starred_url":"https://api.github.com/users/psiemens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psiemens/subscriptions","organizations_url":"https://api.github.com/users/psiemens/orgs","repos_url":"https://api.github.com/users/psiemens/repos","events_url":"https://api.github.com/users/psiemens/events{/privacy}","received_events_url":"https://api.github.com/users/psiemens/received_events","type":"User","site_admin":false},"body":"This should be:\r\n ```py\r\nresponse = self._create_page()\r\n```","created_at":"2017-04-18T18:42:34Z","updated_at":"2017-04-18T18:46:33Z","html_url":"https://github.com/ubyssey/dispatch/pull/503#discussion_r112032778","pull_request_url":"https://api.github.com/repos/ubyssey/dispatch/pulls/503","_links":{"self":{"href":"https://api.github.com/repos/ubyssey/dispatch/pulls/comments/112032778"},"html":{"href":"https://github.com/ubyssey/dispatch/pull/503#discussion_r112032778"},"pull_request":{"href":"https://api.github.com/repos/ubyssey/dispatch/pulls/503"}}},"pull_request":{"url":"https://api.github.com/repos/ubyssey/dispatch/pulls/503","id":116078423,"html_url":"https://github.com/ubyssey/dispatch/pull/503","diff_url":"https://github.com/ubyssey/dispatch/pull/503.diff","patch_url":"https://github.com/ubyssey/dispatch/pull/503.patch","issue_url":"https://api.github.com/repos/ubyssey/dispatch/issues/503","number":503,"state":"open","locked":false,"title":"Add Pages test","user":{"login":"Axel-Jacobsen","id":20530172,"avatar_url":"https://avatars1.githubusercontent.com/u/20530172?v=3","gravatar_id":"","url":"https://api.github.com/users/Axel-Jacobsen","html_url":"https://github.com/Axel-Jacobsen","followers_url":"https://api.github.com/users/Axel-Jacobsen/followers","following_url":"https://api.github.com/users/Axel-Jacobsen/following{/other_user}","gists_url":"https://api.github.com/users/Axel-Jacobsen/gists{/gist_id}","starred_url":"https://api.github.com/users/Axel-Jacobsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Axel-Jacobsen/subscriptions","organizations_url":"https://api.github.com/users/Axel-Jacobsen/orgs","repos_url":"https://api.github.com/users/Axel-Jacobsen/repos","events_url":"https://api.github.com/users/Axel-Jacobsen/events{/privacy}","received_events_url":"https://api.github.com/users/Axel-Jacobsen/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-04-17T01:06:54Z","updated_at":"2017-04-18T18:46:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a2c6f5add1ebca8ec2c8a265c69033ee8d1dac1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ubyssey/dispatch/pulls/503/commits","review_comments_url":"https://api.github.com/repos/ubyssey/dispatch/pulls/503/comments","review_comment_url":"https://api.github.com/repos/ubyssey/dispatch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubyssey/dispatch/issues/503/comments","statuses_url":"https://api.github.com/repos/ubyssey/dispatch/statuses/2c0e685c66dba0d245f30b366fbb8f56f5d4eeb6","head":{"label":"ubyssey:499-page-test","ref":"499-page-test","sha":"2c0e685c66dba0d245f30b366fbb8f56f5d4eeb6","user":{"login":"ubyssey","id":10091792,"avatar_url":"https://avatars3.githubusercontent.com/u/10091792?v=3","gravatar_id":"","url":"https://api.github.com/users/ubyssey","html_url":"https://github.com/ubyssey","followers_url":"https://api.github.com/users/ubyssey/followers","following_url":"https://api.github.com/users/ubyssey/following{/other_user}","gists_url":"https://api.github.com/users/ubyssey/gists{/gist_id}","starred_url":"https://api.github.com/users/ubyssey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubyssey/subscriptions","organizations_url":"https://api.github.com/users/ubyssey/orgs","repos_url":"https://api.github.com/users/ubyssey/repos","events_url":"https://api.github.com/users/ubyssey/events{/privacy}","received_events_url":"https://api.github.com/users/ubyssey/received_events","type":"Organization","site_admin":false},"repo":{"id":27610253,"name":"dispatch","full_name":"ubyssey/dispatch","owner":{"login":"ubyssey","id":10091792,"avatar_url":"https://avatars3.githubusercontent.com/u/10091792?v=3","gravatar_id":"","url":"https://api.github.com/users/ubyssey","html_url":"https://github.com/ubyssey","followers_url":"https://api.github.com/users/ubyssey/followers","following_url":"https://api.github.com/users/ubyssey/following{/other_user}","gists_url":"https://api.github.com/users/ubyssey/gists{/gist_id}","starred_url":"https://api.github.com/users/ubyssey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubyssey/subscriptions","organizations_url":"https://api.github.com/users/ubyssey/orgs","repos_url":"https://api.github.com/users/ubyssey/repos","events_url":"https://api.github.com/users/ubyssey/events{/privacy}","received_events_url":"https://api.github.com/users/ubyssey/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubyssey/dispatch","description":"A publishing platform for modern newspapers.","fork":false,"url":"https://api.github.com/repos/ubyssey/dispatch","forks_url":"https://api.github.com/repos/ubyssey/dispatch/forks","keys_url":"https://api.github.com/repos/ubyssey/dispatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubyssey/dispatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubyssey/dispatch/teams","hooks_url":"https://api.github.com/repos/ubyssey/dispatch/hooks","issue_events_url":"https://api.github.com/repos/ubyssey/dispatch/issues/events{/number}","events_url":"https://api.github.com/repos/ubyssey/dispatch/events","assignees_url":"https://api.github.com/repos/ubyssey/dispatch/assignees{/user}","branches_url":"https://api.github.com/repos/ubyssey/dispatch/branches{/branch}","tags_url":"https://api.github.com/repos/ubyssey/dispatch/tags","blobs_url":"https://api.github.com/repos/ubyssey/dispatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubyssey/dispatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubyssey/dispatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubyssey/dispatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubyssey/dispatch/statuses/{sha}","languages_url":"https://api.github.com/repos/ubyssey/dispatch/languages","stargazers_url":"https://api.github.com/repos/ubyssey/dispatch/stargazers","contributors_url":"https://api.github.com/repos/ubyssey/dispatch/contributors","subscribers_url":"https://api.github.com/repos/ubyssey/dispatch/subscribers","subscription_url":"https://api.github.com/repos/ubyssey/dispatch/subscription","commits_url":"https://api.github.com/repos/ubyssey/dispatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubyssey/dispatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubyssey/dispatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubyssey/dispatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubyssey/dispatch/contents/{+path}","compare_url":"https://api.github.com/repos/ubyssey/dispatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubyssey/dispatch/merges","archive_url":"https://api.github.com/repos/ubyssey/dispatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubyssey/dispatch/downloads","issues_url":"https://api.github.com/repos/ubyssey/dispatch/issues{/number}","pulls_url":"https://api.github.com/repos/ubyssey/dispatch/pulls{/number}","milestones_url":"https://api.github.com/repos/ubyssey/dispatch/milestones{/number}","notifications_url":"https://api.github.com/repos/ubyssey/dispatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubyssey/dispatch/labels{/name}","releases_url":"https://api.github.com/repos/ubyssey/dispatch/releases{/id}","deployments_url":"https://api.github.com/repos/ubyssey/dispatch/deployments","created_at":"2014-12-05T21:09:57Z","updated_at":"2017-04-05T04:52:05Z","pushed_at":"2017-04-18T06:59:32Z","git_url":"git://github.com/ubyssey/dispatch.git","ssh_url":"git@github.com:ubyssey/dispatch.git","clone_url":"https://github.com/ubyssey/dispatch.git","svn_url":"https://github.com/ubyssey/dispatch","homepage":"","size":39812,"stargazers_count":40,"watchers_count":40,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":30,"forks":5,"open_issues":30,"watchers":40,"default_branch":"develop"}},"base":{"label":"ubyssey:develop","ref":"develop","sha":"73be332abe7c2afcde420d3a209a7230b0dbd732","user":{"login":"ubyssey","id":10091792,"avatar_url":"https://avatars3.githubusercontent.com/u/10091792?v=3","gravatar_id":"","url":"https://api.github.com/users/ubyssey","html_url":"https://github.com/ubyssey","followers_url":"https://api.github.com/users/ubyssey/followers","following_url":"https://api.github.com/users/ubyssey/following{/other_user}","gists_url":"https://api.github.com/users/ubyssey/gists{/gist_id}","starred_url":"https://api.github.com/users/ubyssey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubyssey/subscriptions","organizations_url":"https://api.github.com/users/ubyssey/orgs","repos_url":"https://api.github.com/users/ubyssey/repos","events_url":"https://api.github.com/users/ubyssey/events{/privacy}","received_events_url":"https://api.github.com/users/ubyssey/received_events","type":"Organization","site_admin":false},"repo":{"id":27610253,"name":"dispatch","full_name":"ubyssey/dispatch","owner":{"login":"ubyssey","id":10091792,"avatar_url":"https://avatars3.githubusercontent.com/u/10091792?v=3","gravatar_id":"","url":"https://api.github.com/users/ubyssey","html_url":"https://github.com/ubyssey","followers_url":"https://api.github.com/users/ubyssey/followers","following_url":"https://api.github.com/users/ubyssey/following{/other_user}","gists_url":"https://api.github.com/users/ubyssey/gists{/gist_id}","starred_url":"https://api.github.com/users/ubyssey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubyssey/subscriptions","organizations_url":"https://api.github.com/users/ubyssey/orgs","repos_url":"https://api.github.com/users/ubyssey/repos","events_url":"https://api.github.com/users/ubyssey/events{/privacy}","received_events_url":"https://api.github.com/users/ubyssey/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubyssey/dispatch","description":"A publishing platform for modern newspapers.","fork":false,"url":"https://api.github.com/repos/ubyssey/dispatch","forks_url":"https://api.github.com/repos/ubyssey/dispatch/forks","keys_url":"https://api.github.com/repos/ubyssey/dispatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubyssey/dispatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubyssey/dispatch/teams","hooks_url":"https://api.github.com/repos/ubyssey/dispatch/hooks","issue_events_url":"https://api.github.com/repos/ubyssey/dispatch/issues/events{/number}","events_url":"https://api.github.com/repos/ubyssey/dispatch/events","assignees_url":"https://api.github.com/repos/ubyssey/dispatch/assignees{/user}","branches_url":"https://api.github.com/repos/ubyssey/dispatch/branches{/branch}","tags_url":"https://api.github.com/repos/ubyssey/dispatch/tags","blobs_url":"https://api.github.com/repos/ubyssey/dispatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubyssey/dispatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubyssey/dispatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubyssey/dispatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubyssey/dispatch/statuses/{sha}","languages_url":"https://api.github.com/repos/ubyssey/dispatch/languages","stargazers_url":"https://api.github.com/repos/ubyssey/dispatch/stargazers","contributors_url":"https://api.github.com/repos/ubyssey/dispatch/contributors","subscribers_url":"https://api.github.com/repos/ubyssey/dispatch/subscribers","subscription_url":"https://api.github.com/repos/ubyssey/dispatch/subscription","commits_url":"https://api.github.com/repos/ubyssey/dispatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubyssey/dispatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubyssey/dispatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubyssey/dispatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubyssey/dispatch/contents/{+path}","compare_url":"https://api.github.com/repos/ubyssey/dispatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubyssey/dispatch/merges","archive_url":"https://api.github.com/repos/ubyssey/dispatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubyssey/dispatch/downloads","issues_url":"https://api.github.com/repos/ubyssey/dispatch/issues{/number}","pulls_url":"https://api.github.com/repos/ubyssey/dispatch/pulls{/number}","milestones_url":"https://api.github.com/repos/ubyssey/dispatch/milestones{/number}","notifications_url":"https://api.github.com/repos/ubyssey/dispatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubyssey/dispatch/labels{/name}","releases_url":"https://api.github.com/repos/ubyssey/dispatch/releases{/id}","deployments_url":"https://api.github.com/repos/ubyssey/dispatch/deployments","created_at":"2014-12-05T21:09:57Z","updated_at":"2017-04-05T04:52:05Z","pushed_at":"2017-04-18T06:59:32Z","git_url":"git://github.com/ubyssey/dispatch.git","ssh_url":"git@github.com:ubyssey/dispatch.git","clone_url":"https://github.com/ubyssey/dispatch.git","svn_url":"https://github.com/ubyssey/dispatch","homepage":"","size":39812,"stargazers_count":40,"watchers_count":40,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":30,"forks":5,"open_issues":30,"watchers":40,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ubyssey/dispatch/pulls/503"},"html":{"href":"https://github.com/ubyssey/dispatch/pull/503"},"issue":{"href":"https://api.github.com/repos/ubyssey/dispatch/issues/503"},"comments":{"href":"https://api.github.com/repos/ubyssey/dispatch/issues/503/comments"},"review_comments":{"href":"https://api.github.com/repos/ubyssey/dispatch/pulls/503/comments"},"review_comment":{"href":"https://api.github.com/repos/ubyssey/dispatch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubyssey/dispatch/pulls/503/commits"},"statuses":{"href":"https://api.github.com/repos/ubyssey/dispatch/statuses/2c0e685c66dba0d245f30b366fbb8f56f5d4eeb6"}}}}
{"actor":{"display_login":"psiemens"}}