{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/67398312","id":67398312,"diff_hunk":"@@ -25,7 +25,8 @@\n \n \n class TestDraftListView(AdminTestCase):\n-    def setUp(self):\n+    @mock.patch('admin.pre_reg.views.DraftRegistration.get_metadata_files')","path":"admin_tests/pre_reg/test_views.py","position":5,"original_position":5,"commit_id":"a30a22ed20b232f84abb1d4702b8d979aa1d7603","original_commit_id":"a30a22ed20b232f84abb1d4702b8d979aa1d7603","user":{"login":"mfraezz","id":5659262,"avatar_url":"https://avatars.githubusercontent.com/u/5659262?v=3","gravatar_id":"","url":"https://api.github.com/users/mfraezz","html_url":"https://github.com/mfraezz","followers_url":"https://api.github.com/users/mfraezz/followers","following_url":"https://api.github.com/users/mfraezz/following{/other_user}","gists_url":"https://api.github.com/users/mfraezz/gists{/gist_id}","starred_url":"https://api.github.com/users/mfraezz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfraezz/subscriptions","organizations_url":"https://api.github.com/users/mfraezz/orgs","repos_url":"https://api.github.com/users/mfraezz/repos","events_url":"https://api.github.com/users/mfraezz/events{/privacy}","received_events_url":"https://api.github.com/users/mfraezz/received_events","type":"User","site_admin":false},"body":"Why does this need to be mocked? It's not making any outgoing calls, and you're not assigning any side effects / return values / etc. to it here.","created_at":"2016-06-16T18:24:22Z","updated_at":"2016-06-16T18:24:22Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/5775#discussion_r67398312","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5775","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/67398312"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/5775#discussion_r67398312"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5775"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5775","id":72187498,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/5775","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/5775.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/5775.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/5775","number":5775,"state":"open","locked":false,"title":"[Feature] Checkout files on prereg submission [OSF-6411]","user":{"login":"Ghalko","id":5169088,"avatar_url":"https://avatars.githubusercontent.com/u/5169088?v=3","gravatar_id":"","url":"https://api.github.com/users/Ghalko","html_url":"https://github.com/Ghalko","followers_url":"https://api.github.com/users/Ghalko/followers","following_url":"https://api.github.com/users/Ghalko/following{/other_user}","gists_url":"https://api.github.com/users/Ghalko/gists{/gist_id}","starred_url":"https://api.github.com/users/Ghalko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ghalko/subscriptions","organizations_url":"https://api.github.com/users/Ghalko/orgs","repos_url":"https://api.github.com/users/Ghalko/repos","events_url":"https://api.github.com/users/Ghalko/events{/privacy}","received_events_url":"https://api.github.com/users/Ghalko/received_events","type":"User","site_admin":false},"body":"<!-- Before submit your Pull Request, make sure you picked\r\n     the right branch:\r\n\r\n     - For hotfixes, select \"master\" as the target branch\r\n     - For new features, select \"develop\" as the target branch\r\n     - For release feature fixes, select the relevant release branch (release/X.Y.Z) as the target branch -->\r\n\r\n## Purpose\r\n\r\n<!-- Describe the purpose of your changes -->\r\nOn submission to the prereg challenge, this takes the files that the user has indicated they want to submit for review and checks out those files prereg user's account (David). Really this is only a stop-gap measure to warn the user that the files are checked out. They can still make changes to them if they are admin and can force check-in files.\r\n\r\n## Changes\r\n\r\n<!-- Briefly describe or list your changes  -->\r\n- Add three methods to Draft Registrations\r\n- `get_metadata_files` - returns a list of files from the deep wells of metadata.\r\n- `checkout_files` - checks out all files from previous method\r\n- `checkin_files` - checks in all files from `get_metadata_files\r\n\r\n## Side effects\r\n\r\n<!--Any possible side effects? -->\r\nStaging: add a user guid to `PREREG_FILE_CHECKOUT_USER` in `local.py` in order to facilitate testing.\r\nProduction: add David's guid to `PREREG_FILE_CHECKOUT_USER` for this feature to work.\r\n\r\n\r\n## Ticket\r\n\r\n<!-- Link to JIRA ticket, if applicable e.g. https://openscience.atlassian.net/browse/OSF-1234 -->\r\nhttps://openscience.atlassian.net/browse/OSF-6411","created_at":"2016-06-01T14:10:43Z","updated_at":"2016-06-16T18:24:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d66f627a924afd99b27d1ddcb30ad4010793f5b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5775/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5775/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/5775/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/a30a22ed20b232f84abb1d4702b8d979aa1d7603","head":{"label":"Ghalko:feature/prereg_checkout","ref":"feature/prereg_checkout","sha":"a30a22ed20b232f84abb1d4702b8d979aa1d7603","user":{"login":"Ghalko","id":5169088,"avatar_url":"https://avatars.githubusercontent.com/u/5169088?v=3","gravatar_id":"","url":"https://api.github.com/users/Ghalko","html_url":"https://github.com/Ghalko","followers_url":"https://api.github.com/users/Ghalko/followers","following_url":"https://api.github.com/users/Ghalko/following{/other_user}","gists_url":"https://api.github.com/users/Ghalko/gists{/gist_id}","starred_url":"https://api.github.com/users/Ghalko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ghalko/subscriptions","organizations_url":"https://api.github.com/users/Ghalko/orgs","repos_url":"https://api.github.com/users/Ghalko/repos","events_url":"https://api.github.com/users/Ghalko/events{/privacy}","received_events_url":"https://api.github.com/users/Ghalko/received_events","type":"User","site_admin":false},"repo":{"id":31034068,"name":"osf.io","full_name":"Ghalko/osf.io","owner":{"login":"Ghalko","id":5169088,"avatar_url":"https://avatars.githubusercontent.com/u/5169088?v=3","gravatar_id":"","url":"https://api.github.com/users/Ghalko","html_url":"https://github.com/Ghalko","followers_url":"https://api.github.com/users/Ghalko/followers","following_url":"https://api.github.com/users/Ghalko/following{/other_user}","gists_url":"https://api.github.com/users/Ghalko/gists{/gist_id}","starred_url":"https://api.github.com/users/Ghalko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ghalko/subscriptions","organizations_url":"https://api.github.com/users/Ghalko/orgs","repos_url":"https://api.github.com/users/Ghalko/repos","events_url":"https://api.github.com/users/Ghalko/events{/privacy}","received_events_url":"https://api.github.com/users/Ghalko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ghalko/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/Ghalko/osf.io","forks_url":"https://api.github.com/repos/Ghalko/osf.io/forks","keys_url":"https://api.github.com/repos/Ghalko/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ghalko/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ghalko/osf.io/teams","hooks_url":"https://api.github.com/repos/Ghalko/osf.io/hooks","issue_events_url":"https://api.github.com/repos/Ghalko/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/Ghalko/osf.io/events","assignees_url":"https://api.github.com/repos/Ghalko/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/Ghalko/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/Ghalko/osf.io/tags","blobs_url":"https://api.github.com/repos/Ghalko/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ghalko/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ghalko/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ghalko/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ghalko/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/Ghalko/osf.io/languages","stargazers_url":"https://api.github.com/repos/Ghalko/osf.io/stargazers","contributors_url":"https://api.github.com/repos/Ghalko/osf.io/contributors","subscribers_url":"https://api.github.com/repos/Ghalko/osf.io/subscribers","subscription_url":"https://api.github.com/repos/Ghalko/osf.io/subscription","commits_url":"https://api.github.com/repos/Ghalko/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ghalko/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ghalko/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ghalko/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ghalko/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/Ghalko/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ghalko/osf.io/merges","archive_url":"https://api.github.com/repos/Ghalko/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ghalko/osf.io/downloads","issues_url":"https://api.github.com/repos/Ghalko/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/Ghalko/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/Ghalko/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/Ghalko/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ghalko/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/Ghalko/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/Ghalko/osf.io/deployments","created_at":"2015-02-19T20:02:48Z","updated_at":"2015-03-30T13:32:39Z","pushed_at":"2016-06-16T14:53:25Z","git_url":"git://github.com/Ghalko/osf.io.git","ssh_url":"git@github.com:Ghalko/osf.io.git","clone_url":"https://github.com/Ghalko/osf.io.git","svn_url":"https://github.com/Ghalko/osf.io","homepage":"http://osf.io","size":132718,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"250948aee80db8ffadc1c6f8bf9e9ecb0934ab98","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","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://avatars.githubusercontent.com/u/3344584?v=3","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":"2016-06-16T10:17:22Z","pushed_at":"2016-06-16T18:03:47Z","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":"http://osf.io","size":283631,"stargazers_count":226,"watchers_count":226,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":187,"mirror_url":null,"open_issues_count":214,"forks":187,"open_issues":214,"watchers":226,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5775"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/5775"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/5775"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/5775/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5775/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/5775/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/a30a22ed20b232f84abb1d4702b8d979aa1d7603"}}}}
{"actor":{"display_login":"mfraezz"}}