{"action":"created","comment":{"url":"https://api.github.com/repos/ubiquitypress/rua/pulls/comments/169051100","pull_request_review_id":97514281,"id":169051100,"diff_hunk":"@@ -0,0 +1,93 @@\n+import factory\n+\n+from django.contrib.auth.models import User\n+from django.core.urlresolvers import reverse\n+from django.test import TestCase\n+from django.test.client import Client\n+\n+from editorialreview import models\n+from core import models as core_models\n+from review import models as review_models\n+from submission import models as submission_models\n+\n+\n+class UserFactory(factory.Factory):\n+    class Meta:\n+        model = User\n+    username = factory.Sequence(lambda n: 'user{}'.format(n))\n+    email = factory.LazyAttribute(\n+        lambda obj: '{}@example.com'.format(obj.username)\n+    )\n+\n+\n+class EditorialReviewerFactory(UserFactory):\n+    username = 'editorialreviewer'\n+    password = 'editorialreviewerpass'\n+    email = 'editorialreviewer@email.com'\n+\n+\n+class ProposalFormFactory(factory.django.DjangoModelFactory):\n+    class Meta:\n+        model = core_models.ProposalForm\n+\n+\n+class BookFactory(factory.django.DjangoModelFactory):\n+    class Meta:\n+        model = core_models.Book\n+\n+\n+class ProposalFactory(factory.django.DjangoModelFactory):\n+    class Meta:\n+        model = submission_models.Proposal\n+    form = factory.SubFactory(ProposalFormFactory)\n+\n+\n+class BookEditorialReviewFactory(factory.django.DjangoModelFactory):\n+    class Meta:\n+        model = models.EditorialReview\n+    content_object = factory.SubFactory(BookFactory)\n+\n+\n+class ProposalEditorialReviewFactory(factory.django.DjangoModelFactory):\n+    class Meta:\n+        model = models.EditorialReview\n+    content_object = factory.SubFactory(ProposalFactory)\n+\n+\n+class EditorialReviewTests(TestCase):\n+\n+    def setUp(self):\n+        self.client = Client(HTTP_HOST='testing')\n+        self.editorialreviewer = EditorialReviewerFactory.create()\n+        self.book = BookFactory.create()\n+        self.proposal = ProposalFactory.create()\n+        self.client.login(\n+            username=self.editorialreviewer.username,\n+            password=self.editorialreviewer.password\n+        )\n+\n+    def tearDown(self):\n+        pass\n+\n+    def test_set_up(self):\n+        self.assertEqual(\n+            self.editorialreviewer.username,\n+            'editorialreviewer'\n+        )\n+        self.assertEqual(\n+            self.editorialreviewer.email,\n+            'editorialreviewer@email.com'\n+        )\n+\n+    def test_ed_reviewer_download_proposal(self):\n+        self.editorialreview = ProposalEditorialReviewFactory.create()\n+        print(vars(self.editorialreview.content_type))","path":"src/editorialreview/tests.py","position":84,"original_position":84,"commit_id":"d20de78c17b17ad46d93cbc2a0def3f9c8d62295","original_commit_id":"d20de78c17b17ad46d93cbc2a0def3f9c8d62295","user":{"login":"terrasea2","id":25639689,"avatar_url":"https://avatars2.githubusercontent.com/u/25639689?v=4","gravatar_id":"","url":"https://api.github.com/users/terrasea2","html_url":"https://github.com/terrasea2","followers_url":"https://api.github.com/users/terrasea2/followers","following_url":"https://api.github.com/users/terrasea2/following{/other_user}","gists_url":"https://api.github.com/users/terrasea2/gists{/gist_id}","starred_url":"https://api.github.com/users/terrasea2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrasea2/subscriptions","organizations_url":"https://api.github.com/users/terrasea2/orgs","repos_url":"https://api.github.com/users/terrasea2/repos","events_url":"https://api.github.com/users/terrasea2/events{/privacy}","received_events_url":"https://api.github.com/users/terrasea2/received_events","type":"User","site_admin":false},"body":"Why is there a print statement here? Tests shouldn't really have prints in them.","created_at":"2018-02-19T11:37:32Z","updated_at":"2018-02-19T11:46:53Z","html_url":"https://github.com/ubiquitypress/rua/pull/560#discussion_r169051100","pull_request_url":"https://api.github.com/repos/ubiquitypress/rua/pulls/560","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ubiquitypress/rua/pulls/comments/169051100"},"html":{"href":"https://github.com/ubiquitypress/rua/pull/560#discussion_r169051100"},"pull_request":{"href":"https://api.github.com/repos/ubiquitypress/rua/pulls/560"}}},"pull_request":{"url":"https://api.github.com/repos/ubiquitypress/rua/pulls/560","id":169933650,"html_url":"https://github.com/ubiquitypress/rua/pull/560","diff_url":"https://github.com/ubiquitypress/rua/pull/560.diff","patch_url":"https://github.com/ubiquitypress/rua/pull/560.patch","issue_url":"https://api.github.com/repos/ubiquitypress/rua/issues/560","number":560,"state":"open","locked":false,"title":"Feature/editorial review updates","user":{"login":"stuartjennings-up","id":20398161,"avatar_url":"https://avatars3.githubusercontent.com/u/20398161?v=4","gravatar_id":"","url":"https://api.github.com/users/stuartjennings-up","html_url":"https://github.com/stuartjennings-up","followers_url":"https://api.github.com/users/stuartjennings-up/followers","following_url":"https://api.github.com/users/stuartjennings-up/following{/other_user}","gists_url":"https://api.github.com/users/stuartjennings-up/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartjennings-up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartjennings-up/subscriptions","organizations_url":"https://api.github.com/users/stuartjennings-up/orgs","repos_url":"https://api.github.com/users/stuartjennings-up/repos","events_url":"https://api.github.com/users/stuartjennings-up/events{/privacy}","received_events_url":"https://api.github.com/users/stuartjennings-up/received_events","type":"User","site_admin":false},"body":"https://trello.com/c/G62mUvCT/190-3-updates-to-editorial-review-process","created_at":"2018-02-19T11:13:02Z","updated_at":"2018-02-19T11:46:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74cf116adbee78de5a9b1b918a6325eefee1a65f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ubiquitypress/rua/pulls/560/commits","review_comments_url":"https://api.github.com/repos/ubiquitypress/rua/pulls/560/comments","review_comment_url":"https://api.github.com/repos/ubiquitypress/rua/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubiquitypress/rua/issues/560/comments","statuses_url":"https://api.github.com/repos/ubiquitypress/rua/statuses/d20de78c17b17ad46d93cbc2a0def3f9c8d62295","head":{"label":"ubiquitypress:feature/editorial-review-updates","ref":"feature/editorial-review-updates","sha":"d20de78c17b17ad46d93cbc2a0def3f9c8d62295","user":{"login":"ubiquitypress","id":9569033,"avatar_url":"https://avatars1.githubusercontent.com/u/9569033?v=4","gravatar_id":"","url":"https://api.github.com/users/ubiquitypress","html_url":"https://github.com/ubiquitypress","followers_url":"https://api.github.com/users/ubiquitypress/followers","following_url":"https://api.github.com/users/ubiquitypress/following{/other_user}","gists_url":"https://api.github.com/users/ubiquitypress/gists{/gist_id}","starred_url":"https://api.github.com/users/ubiquitypress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubiquitypress/subscriptions","organizations_url":"https://api.github.com/users/ubiquitypress/orgs","repos_url":"https://api.github.com/users/ubiquitypress/repos","events_url":"https://api.github.com/users/ubiquitypress/events{/privacy}","received_events_url":"https://api.github.com/users/ubiquitypress/received_events","type":"Organization","site_admin":false},"repo":{"id":33120052,"name":"rua","full_name":"ubiquitypress/rua","owner":{"login":"ubiquitypress","id":9569033,"avatar_url":"https://avatars1.githubusercontent.com/u/9569033?v=4","gravatar_id":"","url":"https://api.github.com/users/ubiquitypress","html_url":"https://github.com/ubiquitypress","followers_url":"https://api.github.com/users/ubiquitypress/followers","following_url":"https://api.github.com/users/ubiquitypress/following{/other_user}","gists_url":"https://api.github.com/users/ubiquitypress/gists{/gist_id}","starred_url":"https://api.github.com/users/ubiquitypress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubiquitypress/subscriptions","organizations_url":"https://api.github.com/users/ubiquitypress/orgs","repos_url":"https://api.github.com/users/ubiquitypress/repos","events_url":"https://api.github.com/users/ubiquitypress/events{/privacy}","received_events_url":"https://api.github.com/users/ubiquitypress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubiquitypress/rua","description":"Rua, the simple monograph workflow","fork":false,"url":"https://api.github.com/repos/ubiquitypress/rua","forks_url":"https://api.github.com/repos/ubiquitypress/rua/forks","keys_url":"https://api.github.com/repos/ubiquitypress/rua/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubiquitypress/rua/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubiquitypress/rua/teams","hooks_url":"https://api.github.com/repos/ubiquitypress/rua/hooks","issue_events_url":"https://api.github.com/repos/ubiquitypress/rua/issues/events{/number}","events_url":"https://api.github.com/repos/ubiquitypress/rua/events","assignees_url":"https://api.github.com/repos/ubiquitypress/rua/assignees{/user}","branches_url":"https://api.github.com/repos/ubiquitypress/rua/branches{/branch}","tags_url":"https://api.github.com/repos/ubiquitypress/rua/tags","blobs_url":"https://api.github.com/repos/ubiquitypress/rua/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubiquitypress/rua/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubiquitypress/rua/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubiquitypress/rua/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubiquitypress/rua/statuses/{sha}","languages_url":"https://api.github.com/repos/ubiquitypress/rua/languages","stargazers_url":"https://api.github.com/repos/ubiquitypress/rua/stargazers","contributors_url":"https://api.github.com/repos/ubiquitypress/rua/contributors","subscribers_url":"https://api.github.com/repos/ubiquitypress/rua/subscribers","subscription_url":"https://api.github.com/repos/ubiquitypress/rua/subscription","commits_url":"https://api.github.com/repos/ubiquitypress/rua/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubiquitypress/rua/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubiquitypress/rua/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubiquitypress/rua/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubiquitypress/rua/contents/{+path}","compare_url":"https://api.github.com/repos/ubiquitypress/rua/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubiquitypress/rua/merges","archive_url":"https://api.github.com/repos/ubiquitypress/rua/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubiquitypress/rua/downloads","issues_url":"https://api.github.com/repos/ubiquitypress/rua/issues{/number}","pulls_url":"https://api.github.com/repos/ubiquitypress/rua/pulls{/number}","milestones_url":"https://api.github.com/repos/ubiquitypress/rua/milestones{/number}","notifications_url":"https://api.github.com/repos/ubiquitypress/rua/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubiquitypress/rua/labels{/name}","releases_url":"https://api.github.com/repos/ubiquitypress/rua/releases{/id}","deployments_url":"https://api.github.com/repos/ubiquitypress/rua/deployments","created_at":"2015-03-30T11:47:28Z","updated_at":"2017-08-17T14:25:41Z","pushed_at":"2018-02-19T11:13:03Z","git_url":"git://github.com/ubiquitypress/rua.git","ssh_url":"git@github.com:ubiquitypress/rua.git","clone_url":"https://github.com/ubiquitypress/rua.git","svn_url":"https://github.com/ubiquitypress/rua","homepage":"http://rua.pm","size":5112,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":43,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":3,"open_issues":43,"watchers":7,"default_branch":"master"}},"base":{"label":"ubiquitypress:master","ref":"master","sha":"54897182d83dd21ea6b169ff84773b3fb8d11625","user":{"login":"ubiquitypress","id":9569033,"avatar_url":"https://avatars1.githubusercontent.com/u/9569033?v=4","gravatar_id":"","url":"https://api.github.com/users/ubiquitypress","html_url":"https://github.com/ubiquitypress","followers_url":"https://api.github.com/users/ubiquitypress/followers","following_url":"https://api.github.com/users/ubiquitypress/following{/other_user}","gists_url":"https://api.github.com/users/ubiquitypress/gists{/gist_id}","starred_url":"https://api.github.com/users/ubiquitypress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubiquitypress/subscriptions","organizations_url":"https://api.github.com/users/ubiquitypress/orgs","repos_url":"https://api.github.com/users/ubiquitypress/repos","events_url":"https://api.github.com/users/ubiquitypress/events{/privacy}","received_events_url":"https://api.github.com/users/ubiquitypress/received_events","type":"Organization","site_admin":false},"repo":{"id":33120052,"name":"rua","full_name":"ubiquitypress/rua","owner":{"login":"ubiquitypress","id":9569033,"avatar_url":"https://avatars1.githubusercontent.com/u/9569033?v=4","gravatar_id":"","url":"https://api.github.com/users/ubiquitypress","html_url":"https://github.com/ubiquitypress","followers_url":"https://api.github.com/users/ubiquitypress/followers","following_url":"https://api.github.com/users/ubiquitypress/following{/other_user}","gists_url":"https://api.github.com/users/ubiquitypress/gists{/gist_id}","starred_url":"https://api.github.com/users/ubiquitypress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubiquitypress/subscriptions","organizations_url":"https://api.github.com/users/ubiquitypress/orgs","repos_url":"https://api.github.com/users/ubiquitypress/repos","events_url":"https://api.github.com/users/ubiquitypress/events{/privacy}","received_events_url":"https://api.github.com/users/ubiquitypress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubiquitypress/rua","description":"Rua, the simple monograph workflow","fork":false,"url":"https://api.github.com/repos/ubiquitypress/rua","forks_url":"https://api.github.com/repos/ubiquitypress/rua/forks","keys_url":"https://api.github.com/repos/ubiquitypress/rua/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubiquitypress/rua/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubiquitypress/rua/teams","hooks_url":"https://api.github.com/repos/ubiquitypress/rua/hooks","issue_events_url":"https://api.github.com/repos/ubiquitypress/rua/issues/events{/number}","events_url":"https://api.github.com/repos/ubiquitypress/rua/events","assignees_url":"https://api.github.com/repos/ubiquitypress/rua/assignees{/user}","branches_url":"https://api.github.com/repos/ubiquitypress/rua/branches{/branch}","tags_url":"https://api.github.com/repos/ubiquitypress/rua/tags","blobs_url":"https://api.github.com/repos/ubiquitypress/rua/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubiquitypress/rua/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubiquitypress/rua/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubiquitypress/rua/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubiquitypress/rua/statuses/{sha}","languages_url":"https://api.github.com/repos/ubiquitypress/rua/languages","stargazers_url":"https://api.github.com/repos/ubiquitypress/rua/stargazers","contributors_url":"https://api.github.com/repos/ubiquitypress/rua/contributors","subscribers_url":"https://api.github.com/repos/ubiquitypress/rua/subscribers","subscription_url":"https://api.github.com/repos/ubiquitypress/rua/subscription","commits_url":"https://api.github.com/repos/ubiquitypress/rua/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubiquitypress/rua/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubiquitypress/rua/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubiquitypress/rua/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubiquitypress/rua/contents/{+path}","compare_url":"https://api.github.com/repos/ubiquitypress/rua/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubiquitypress/rua/merges","archive_url":"https://api.github.com/repos/ubiquitypress/rua/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubiquitypress/rua/downloads","issues_url":"https://api.github.com/repos/ubiquitypress/rua/issues{/number}","pulls_url":"https://api.github.com/repos/ubiquitypress/rua/pulls{/number}","milestones_url":"https://api.github.com/repos/ubiquitypress/rua/milestones{/number}","notifications_url":"https://api.github.com/repos/ubiquitypress/rua/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubiquitypress/rua/labels{/name}","releases_url":"https://api.github.com/repos/ubiquitypress/rua/releases{/id}","deployments_url":"https://api.github.com/repos/ubiquitypress/rua/deployments","created_at":"2015-03-30T11:47:28Z","updated_at":"2017-08-17T14:25:41Z","pushed_at":"2018-02-19T11:13:03Z","git_url":"git://github.com/ubiquitypress/rua.git","ssh_url":"git@github.com:ubiquitypress/rua.git","clone_url":"https://github.com/ubiquitypress/rua.git","svn_url":"https://github.com/ubiquitypress/rua","homepage":"http://rua.pm","size":5112,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":43,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":3,"open_issues":43,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubiquitypress/rua/pulls/560"},"html":{"href":"https://github.com/ubiquitypress/rua/pull/560"},"issue":{"href":"https://api.github.com/repos/ubiquitypress/rua/issues/560"},"comments":{"href":"https://api.github.com/repos/ubiquitypress/rua/issues/560/comments"},"review_comments":{"href":"https://api.github.com/repos/ubiquitypress/rua/pulls/560/comments"},"review_comment":{"href":"https://api.github.com/repos/ubiquitypress/rua/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubiquitypress/rua/pulls/560/commits"},"statuses":{"href":"https://api.github.com/repos/ubiquitypress/rua/statuses/d20de78c17b17ad46d93cbc2a0def3f9c8d62295"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"terrasea2"}}