{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/130986982","pull_request_review_id":53922155,"id":130986982,"diff_hunk":"@@ -1,95 +1,127 @@\n # -*- coding: utf-8 -*-\n-import random\n-\n-import mock\n-\n from datetime import datetime\n-\n-from nose.tools import *  # flake8: noqa\n-\n-from rest_framework import exceptions\n+import mock\n+import pytest\n+import random\n \n from api.base.exceptions import Conflict\n from api.base.settings.defaults import API_BASE\n from api.nodes.serializers import NodeContributorsCreateSerializer\n-\n from framework.auth.core import Auth\n-\n-from tests.base import ApiTestCase, capture_signals, fake\n+from osf.models import NodeLog\n from osf_tests.factories import (\n     ProjectFactory,\n     AuthUserFactory,\n     UserFactory,\n-    UnconfirmedUserFactory\n+    UnconfirmedUserFactory,\n )\n-from tests.utils import assert_logs\n-\n-from osf.models import NodeLog\n+from rest_framework import exceptions\n+from tests.base import capture_signals, fake\n+from tests.utils import assert_latest_log, assert_items_equal\n from website.project.signals import contributor_added, unreg_contributor_added, contributor_removed\n from website.util import permissions, disconnected_from_listeners\n \n \n-class NodeCRUDTestCase(ApiTestCase):\n+@pytest.fixture()\n+def user():\n+    return AuthUserFactory()\n \n-    def setUp(self):\n-        super(NodeCRUDTestCase, self).setUp()\n-        self.user = AuthUserFactory()\n-        self.user_two = AuthUserFactory()\n+@pytest.mark.django_db\n+class NodeCRUDTestCase:\n \n-        self.title = 'Cool Project'\n-        self.new_title = 'Super Cool Project'\n-        self.description = 'A Properly Cool Project'\n-        self.new_description = 'An even cooler project'\n-        self.category = 'data'\n-        self.new_category = 'project'\n+    @pytest.fixture()\n+    def user(self):\n+        return AuthUserFactory()\n \n-        self.public_project = ProjectFactory(title=self.title,\n-                                             description=self.description,\n-                                             category=self.category,\n-                                             is_public=True,\n-                                             creator=self.user)\n+    @pytest.fixture()\n+    def user_two(self):\n+        return AuthUserFactory()\n \n-        self.public_url = '/{}nodes/{}/'.format(API_BASE, self.public_project._id)\n+    @pytest.fixture()\n+    def title(self):\n+        return 'Cool Project'\n \n-        self.private_project = ProjectFactory(title=self.title,\n-                                              description=self.description,\n-                                              category=self.category,\n-                                              is_public=False,\n-                                              creator=self.user)\n-        self.private_url = '/{}nodes/{}/'.format(API_BASE, self.private_project._id)\n+    @pytest.fixture()","path":"api_tests/nodes/views/test_node_contributors_list.py","position":82,"original_position":82,"commit_id":"1df078c43cab06e1db491ab950495ab382047a59","original_commit_id":"1df078c43cab06e1db491ab950495ab382047a59","user":{"login":"sloria","id":2379650,"avatar_url":"https://avatars2.githubusercontent.com/u/2379650?v=4","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"body":"Are these title and description fixtures used in more than one place? Might be overuse of fixtures. Not a blocker, though.","created_at":"2017-08-02T20:27:24Z","updated_at":"2017-08-02T20:27:24Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/7522#discussion_r130986982","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/7522","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/130986982"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/7522#discussion_r130986982"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/7522"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/7522","id":132763092,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/7522","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/7522.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/7522.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/7522","number":7522,"state":"open","locked":false,"title":"[feature] Pytest Conversion: Node Part 5 [OSF-8292]","user":{"login":"Nesiehr","id":7832815,"avatar_url":"https://avatars2.githubusercontent.com/u/7832815?v=4","gravatar_id":"","url":"https://api.github.com/users/Nesiehr","html_url":"https://github.com/Nesiehr","followers_url":"https://api.github.com/users/Nesiehr/followers","following_url":"https://api.github.com/users/Nesiehr/following{/other_user}","gists_url":"https://api.github.com/users/Nesiehr/gists{/gist_id}","starred_url":"https://api.github.com/users/Nesiehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nesiehr/subscriptions","organizations_url":"https://api.github.com/users/Nesiehr/orgs","repos_url":"https://api.github.com/users/Nesiehr/repos","events_url":"https://api.github.com/users/Nesiehr/events{/privacy}","received_events_url":"https://api.github.com/users/Nesiehr/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n\r\n<!-- Describe the purpose of your changes -->\r\nConversion of API tests to Pytest\r\nTesting Performance Increase\r\n\r\n## Changes\r\n\r\n<!-- Briefly describe or list your changes  -->\r\nPytest conversion of far too many large node files\r\nPytest conversion of two already converted mixins to follow the new pytest mixin format\r\n\r\n## Side effects\r\n\r\n<!--Any possible side effects? -->\r\nNone known.\r\n\r\n## Ticket\r\n\r\n<!-- Link to JIRA ticket, e.g. https://openscience.atlassian.net/browse/OSF-1234 -->\r\nhttps://openscience.atlassian.net/browse/OSF-8292\r\n\r\n## QA Considerations\r\n\r\nN/A","created_at":"2017-07-27T14:30:41Z","updated_at":"2017-08-02T20:27:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c72630b10743ad82615b0c56e949ba38b776015","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/7522/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/7522/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/7522/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/1df078c43cab06e1db491ab950495ab382047a59","head":{"label":"Nesiehr:feature/OSF-8292_Node_Part_5","ref":"feature/OSF-8292_Node_Part_5","sha":"1df078c43cab06e1db491ab950495ab382047a59","user":{"login":"Nesiehr","id":7832815,"avatar_url":"https://avatars2.githubusercontent.com/u/7832815?v=4","gravatar_id":"","url":"https://api.github.com/users/Nesiehr","html_url":"https://github.com/Nesiehr","followers_url":"https://api.github.com/users/Nesiehr/followers","following_url":"https://api.github.com/users/Nesiehr/following{/other_user}","gists_url":"https://api.github.com/users/Nesiehr/gists{/gist_id}","starred_url":"https://api.github.com/users/Nesiehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nesiehr/subscriptions","organizations_url":"https://api.github.com/users/Nesiehr/orgs","repos_url":"https://api.github.com/users/Nesiehr/repos","events_url":"https://api.github.com/users/Nesiehr/events{/privacy}","received_events_url":"https://api.github.com/users/Nesiehr/received_events","type":"User","site_admin":false},"repo":{"id":91358371,"name":"osf.io","full_name":"Nesiehr/osf.io","owner":{"login":"Nesiehr","id":7832815,"avatar_url":"https://avatars2.githubusercontent.com/u/7832815?v=4","gravatar_id":"","url":"https://api.github.com/users/Nesiehr","html_url":"https://github.com/Nesiehr","followers_url":"https://api.github.com/users/Nesiehr/followers","following_url":"https://api.github.com/users/Nesiehr/following{/other_user}","gists_url":"https://api.github.com/users/Nesiehr/gists{/gist_id}","starred_url":"https://api.github.com/users/Nesiehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nesiehr/subscriptions","organizations_url":"https://api.github.com/users/Nesiehr/orgs","repos_url":"https://api.github.com/users/Nesiehr/repos","events_url":"https://api.github.com/users/Nesiehr/events{/privacy}","received_events_url":"https://api.github.com/users/Nesiehr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nesiehr/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/Nesiehr/osf.io","forks_url":"https://api.github.com/repos/Nesiehr/osf.io/forks","keys_url":"https://api.github.com/repos/Nesiehr/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nesiehr/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nesiehr/osf.io/teams","hooks_url":"https://api.github.com/repos/Nesiehr/osf.io/hooks","issue_events_url":"https://api.github.com/repos/Nesiehr/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/Nesiehr/osf.io/events","assignees_url":"https://api.github.com/repos/Nesiehr/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/Nesiehr/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/Nesiehr/osf.io/tags","blobs_url":"https://api.github.com/repos/Nesiehr/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nesiehr/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nesiehr/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nesiehr/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nesiehr/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/Nesiehr/osf.io/languages","stargazers_url":"https://api.github.com/repos/Nesiehr/osf.io/stargazers","contributors_url":"https://api.github.com/repos/Nesiehr/osf.io/contributors","subscribers_url":"https://api.github.com/repos/Nesiehr/osf.io/subscribers","subscription_url":"https://api.github.com/repos/Nesiehr/osf.io/subscription","commits_url":"https://api.github.com/repos/Nesiehr/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nesiehr/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nesiehr/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nesiehr/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nesiehr/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/Nesiehr/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nesiehr/osf.io/merges","archive_url":"https://api.github.com/repos/Nesiehr/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nesiehr/osf.io/downloads","issues_url":"https://api.github.com/repos/Nesiehr/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/Nesiehr/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/Nesiehr/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/Nesiehr/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nesiehr/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/Nesiehr/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/Nesiehr/osf.io/deployments","created_at":"2017-05-15T16:11:21Z","updated_at":"2017-05-15T16:11:31Z","pushed_at":"2017-08-02T19:09:35Z","git_url":"git://github.com/Nesiehr/osf.io.git","ssh_url":"git@github.com:Nesiehr/osf.io.git","clone_url":"https://github.com/Nesiehr/osf.io.git","svn_url":"https://github.com/Nesiehr/osf.io","homepage":"https://osf.io","size":156377,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"0afaba66a658d43a49f2946a84e5741ad0484f46","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/deployments","created_at":"2013-05-21T15:53:37Z","updated_at":"2017-08-02T16:53:24Z","pushed_at":"2017-08-02T20:22:43Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"https://osf.io","size":156614,"stargazers_count":351,"watchers_count":351,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":230,"mirror_url":null,"open_issues_count":262,"forks":230,"open_issues":262,"watchers":351,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/7522"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/7522"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/7522"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/7522/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/7522/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/7522/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/1df078c43cab06e1db491ab950495ab382047a59"}}}}
{"actor":{"display_login":"sloria"}}