{"action":"created","comment":{"url":"https://api.github.com/repos/globus/globus-cli/pulls/comments/124055810","pull_request_review_id":46312986,"id":124055810,"diff_hunk":"@@ -46,12 +51,14 @@ def clean_sharing():\n         tc.submit_delete(ddata)\n \n \n-def write_test_config(conf):\n+def default_test_config(*args, **kwargs):\n     \"\"\"\n-    Writes known constants and refresh tokens into config for testing\n+    Returns a ConfigObj with the clitester's refresh tokens and whoami info\n+    as if the clitester was logged in and a call to get_config_obj was made.\n     \"\"\"\n     user_data = get_user_data()[\"clitester1a\"]\n-    testing_constants = {\n+\n+    return ConfigObj({\"cli\": {","path":"tests/framework/cli_testcase.py","position":37,"original_position":37,"commit_id":"79996fb293f993183a27240097590d1ee41346ee","original_commit_id":"79996fb293f993183a27240097590d1ee41346ee","user":{"login":"sirosen","id":1300022,"avatar_url":"https://avatars0.githubusercontent.com/u/1300022?v=3","gravatar_id":"","url":"https://api.github.com/users/sirosen","html_url":"https://github.com/sirosen","followers_url":"https://api.github.com/users/sirosen/followers","following_url":"https://api.github.com/users/sirosen/following{/other_user}","gists_url":"https://api.github.com/users/sirosen/gists{/gist_id}","starred_url":"https://api.github.com/users/sirosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirosen/subscriptions","organizations_url":"https://api.github.com/users/sirosen/orgs","repos_url":"https://api.github.com/users/sirosen/repos","events_url":"https://api.github.com/users/sirosen/events{/privacy}","received_events_url":"https://api.github.com/users/sirosen/received_events","type":"User","site_admin":false},"body":"Can you add a comment here? The behavior of `ConfigObj`, when initialized this way, is kind of unintuitive.\r\n\r\nSpecifically, explain that:\r\n- You can create a `ConfigObj` from a `dict`, which sets `ConfigObj.filename = None`\r\n- When `ConfigObj.filename = None`, then `ConfigObj.write()` returns a string and writes nothing to disk\r\n\r\nI had to go to the configobj docs site to know that this was safe.\r\n\r\nThat said, this behavior seems perfect for testing.","created_at":"2017-06-26T16:24:51Z","updated_at":"2017-06-26T16:24:51Z","html_url":"https://github.com/globus/globus-cli/pull/332#discussion_r124055810","pull_request_url":"https://api.github.com/repos/globus/globus-cli/pulls/332","_links":{"self":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/comments/124055810"},"html":{"href":"https://github.com/globus/globus-cli/pull/332#discussion_r124055810"},"pull_request":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/332"}}},"pull_request":{"url":"https://api.github.com/repos/globus/globus-cli/pulls/332","id":127506885,"html_url":"https://github.com/globus/globus-cli/pull/332","diff_url":"https://github.com/globus/globus-cli/pull/332.diff","patch_url":"https://github.com/globus/globus-cli/pull/332.patch","issue_url":"https://api.github.com/repos/globus/globus-cli/issues/332","number":332,"state":"open","locked":false,"title":"Mock config file for testing","user":{"login":"aaschaer","id":6373786,"avatar_url":"https://avatars1.githubusercontent.com/u/6373786?v=3","gravatar_id":"","url":"https://api.github.com/users/aaschaer","html_url":"https://github.com/aaschaer","followers_url":"https://api.github.com/users/aaschaer/followers","following_url":"https://api.github.com/users/aaschaer/following{/other_user}","gists_url":"https://api.github.com/users/aaschaer/gists{/gist_id}","starred_url":"https://api.github.com/users/aaschaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaschaer/subscriptions","organizations_url":"https://api.github.com/users/aaschaer/orgs","repos_url":"https://api.github.com/users/aaschaer/repos","events_url":"https://api.github.com/users/aaschaer/events{/privacy}","received_events_url":"https://api.github.com/users/aaschaer/received_events","type":"User","site_admin":false},"body":"As discussed, mocks out the whole config layer by patching calls to `get_config_obj`.\r\n\r\nThis should make it more difficult to accidentally revoke the testing tokens, and adds the ability to specify config per call of run_line for further testing of login/logout later.","created_at":"2017-06-26T16:09:51Z","updated_at":"2017-06-26T16:24:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57187c6b448bd5e35af2ee02bc4d628f3a41a2b2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/globus/globus-cli/pulls/332/commits","review_comments_url":"https://api.github.com/repos/globus/globus-cli/pulls/332/comments","review_comment_url":"https://api.github.com/repos/globus/globus-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/globus/globus-cli/issues/332/comments","statuses_url":"https://api.github.com/repos/globus/globus-cli/statuses/79996fb293f993183a27240097590d1ee41346ee","head":{"label":"aaschaer:mock_login","ref":"mock_login","sha":"79996fb293f993183a27240097590d1ee41346ee","user":{"login":"aaschaer","id":6373786,"avatar_url":"https://avatars1.githubusercontent.com/u/6373786?v=3","gravatar_id":"","url":"https://api.github.com/users/aaschaer","html_url":"https://github.com/aaschaer","followers_url":"https://api.github.com/users/aaschaer/followers","following_url":"https://api.github.com/users/aaschaer/following{/other_user}","gists_url":"https://api.github.com/users/aaschaer/gists{/gist_id}","starred_url":"https://api.github.com/users/aaschaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaschaer/subscriptions","organizations_url":"https://api.github.com/users/aaschaer/orgs","repos_url":"https://api.github.com/users/aaschaer/repos","events_url":"https://api.github.com/users/aaschaer/events{/privacy}","received_events_url":"https://api.github.com/users/aaschaer/received_events","type":"User","site_admin":false},"repo":{"id":78547916,"name":"globus-cli","full_name":"aaschaer/globus-cli","owner":{"login":"aaschaer","id":6373786,"avatar_url":"https://avatars1.githubusercontent.com/u/6373786?v=3","gravatar_id":"","url":"https://api.github.com/users/aaschaer","html_url":"https://github.com/aaschaer","followers_url":"https://api.github.com/users/aaschaer/followers","following_url":"https://api.github.com/users/aaschaer/following{/other_user}","gists_url":"https://api.github.com/users/aaschaer/gists{/gist_id}","starred_url":"https://api.github.com/users/aaschaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaschaer/subscriptions","organizations_url":"https://api.github.com/users/aaschaer/orgs","repos_url":"https://api.github.com/users/aaschaer/repos","events_url":"https://api.github.com/users/aaschaer/events{/privacy}","received_events_url":"https://api.github.com/users/aaschaer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaschaer/globus-cli","description":"A Command Line Wrapper over the Globus SDK for Python","fork":true,"url":"https://api.github.com/repos/aaschaer/globus-cli","forks_url":"https://api.github.com/repos/aaschaer/globus-cli/forks","keys_url":"https://api.github.com/repos/aaschaer/globus-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaschaer/globus-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaschaer/globus-cli/teams","hooks_url":"https://api.github.com/repos/aaschaer/globus-cli/hooks","issue_events_url":"https://api.github.com/repos/aaschaer/globus-cli/issues/events{/number}","events_url":"https://api.github.com/repos/aaschaer/globus-cli/events","assignees_url":"https://api.github.com/repos/aaschaer/globus-cli/assignees{/user}","branches_url":"https://api.github.com/repos/aaschaer/globus-cli/branches{/branch}","tags_url":"https://api.github.com/repos/aaschaer/globus-cli/tags","blobs_url":"https://api.github.com/repos/aaschaer/globus-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaschaer/globus-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaschaer/globus-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaschaer/globus-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaschaer/globus-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/aaschaer/globus-cli/languages","stargazers_url":"https://api.github.com/repos/aaschaer/globus-cli/stargazers","contributors_url":"https://api.github.com/repos/aaschaer/globus-cli/contributors","subscribers_url":"https://api.github.com/repos/aaschaer/globus-cli/subscribers","subscription_url":"https://api.github.com/repos/aaschaer/globus-cli/subscription","commits_url":"https://api.github.com/repos/aaschaer/globus-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaschaer/globus-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaschaer/globus-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaschaer/globus-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaschaer/globus-cli/contents/{+path}","compare_url":"https://api.github.com/repos/aaschaer/globus-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaschaer/globus-cli/merges","archive_url":"https://api.github.com/repos/aaschaer/globus-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaschaer/globus-cli/downloads","issues_url":"https://api.github.com/repos/aaschaer/globus-cli/issues{/number}","pulls_url":"https://api.github.com/repos/aaschaer/globus-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/aaschaer/globus-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/aaschaer/globus-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaschaer/globus-cli/labels{/name}","releases_url":"https://api.github.com/repos/aaschaer/globus-cli/releases{/id}","deployments_url":"https://api.github.com/repos/aaschaer/globus-cli/deployments","created_at":"2017-01-10T15:45:18Z","updated_at":"2017-01-10T15:45:20Z","pushed_at":"2017-06-26T16:19:22Z","git_url":"git://github.com/aaschaer/globus-cli.git","ssh_url":"git@github.com:aaschaer/globus-cli.git","clone_url":"https://github.com/aaschaer/globus-cli.git","svn_url":"https://github.com/aaschaer/globus-cli","homepage":null,"size":891,"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":"master"}},"base":{"label":"globus:master","ref":"master","sha":"3a0d995678d3f8bb2fb2d84b7cf7fbdddbc68d4a","user":{"login":"globus","id":6120321,"avatar_url":"https://avatars1.githubusercontent.com/u/6120321?v=3","gravatar_id":"","url":"https://api.github.com/users/globus","html_url":"https://github.com/globus","followers_url":"https://api.github.com/users/globus/followers","following_url":"https://api.github.com/users/globus/following{/other_user}","gists_url":"https://api.github.com/users/globus/gists{/gist_id}","starred_url":"https://api.github.com/users/globus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/globus/subscriptions","organizations_url":"https://api.github.com/users/globus/orgs","repos_url":"https://api.github.com/users/globus/repos","events_url":"https://api.github.com/users/globus/events{/privacy}","received_events_url":"https://api.github.com/users/globus/received_events","type":"Organization","site_admin":false},"repo":{"id":53438969,"name":"globus-cli","full_name":"globus/globus-cli","owner":{"login":"globus","id":6120321,"avatar_url":"https://avatars1.githubusercontent.com/u/6120321?v=3","gravatar_id":"","url":"https://api.github.com/users/globus","html_url":"https://github.com/globus","followers_url":"https://api.github.com/users/globus/followers","following_url":"https://api.github.com/users/globus/following{/other_user}","gists_url":"https://api.github.com/users/globus/gists{/gist_id}","starred_url":"https://api.github.com/users/globus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/globus/subscriptions","organizations_url":"https://api.github.com/users/globus/orgs","repos_url":"https://api.github.com/users/globus/repos","events_url":"https://api.github.com/users/globus/events{/privacy}","received_events_url":"https://api.github.com/users/globus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/globus/globus-cli","description":"A Command Line Wrapper over the Globus SDK for Python","fork":false,"url":"https://api.github.com/repos/globus/globus-cli","forks_url":"https://api.github.com/repos/globus/globus-cli/forks","keys_url":"https://api.github.com/repos/globus/globus-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/globus/globus-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/globus/globus-cli/teams","hooks_url":"https://api.github.com/repos/globus/globus-cli/hooks","issue_events_url":"https://api.github.com/repos/globus/globus-cli/issues/events{/number}","events_url":"https://api.github.com/repos/globus/globus-cli/events","assignees_url":"https://api.github.com/repos/globus/globus-cli/assignees{/user}","branches_url":"https://api.github.com/repos/globus/globus-cli/branches{/branch}","tags_url":"https://api.github.com/repos/globus/globus-cli/tags","blobs_url":"https://api.github.com/repos/globus/globus-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/globus/globus-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/globus/globus-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/globus/globus-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/globus/globus-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/globus/globus-cli/languages","stargazers_url":"https://api.github.com/repos/globus/globus-cli/stargazers","contributors_url":"https://api.github.com/repos/globus/globus-cli/contributors","subscribers_url":"https://api.github.com/repos/globus/globus-cli/subscribers","subscription_url":"https://api.github.com/repos/globus/globus-cli/subscription","commits_url":"https://api.github.com/repos/globus/globus-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/globus/globus-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/globus/globus-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/globus/globus-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/globus/globus-cli/contents/{+path}","compare_url":"https://api.github.com/repos/globus/globus-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/globus/globus-cli/merges","archive_url":"https://api.github.com/repos/globus/globus-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/globus/globus-cli/downloads","issues_url":"https://api.github.com/repos/globus/globus-cli/issues{/number}","pulls_url":"https://api.github.com/repos/globus/globus-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/globus/globus-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/globus/globus-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/globus/globus-cli/labels{/name}","releases_url":"https://api.github.com/repos/globus/globus-cli/releases{/id}","deployments_url":"https://api.github.com/repos/globus/globus-cli/deployments","created_at":"2016-03-08T19:25:41Z","updated_at":"2017-03-27T17:32:01Z","pushed_at":"2017-06-26T16:19:23Z","git_url":"git://github.com/globus/globus-cli.git","ssh_url":"git@github.com:globus/globus-cli.git","clone_url":"https://github.com/globus/globus-cli.git","svn_url":"https://github.com/globus/globus-cli","homepage":null,"size":852,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":36,"forks":7,"open_issues":36,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/332"},"html":{"href":"https://github.com/globus/globus-cli/pull/332"},"issue":{"href":"https://api.github.com/repos/globus/globus-cli/issues/332"},"comments":{"href":"https://api.github.com/repos/globus/globus-cli/issues/332/comments"},"review_comments":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/332/comments"},"review_comment":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/332/commits"},"statuses":{"href":"https://api.github.com/repos/globus/globus-cli/statuses/79996fb293f993183a27240097590d1ee41346ee"}}}}
{"actor":{"display_login":"sirosen"}}