{"action":"created","comment":{"url":"https://api.github.com/repos/gogoair/foremast/pulls/comments/168893040","pull_request_review_id":97289203,"id":168893040,"diff_hunk":"@@ -50,58 +49,51 @@ def test_project_id_exception(mock_gitlab):\n @mock.patch('foremast.utils.lookups.gitlab')\n def test_project_id_success(mock_gitlab):\n     \"\"\"Check resolving GitLab Project ID is successful.\"\"\"\n-    project_id = 30\n-\n-    mock_gitlab.Gitlab.return_value.getproject.return_value = {'id': project_id}\n-\n+    project_id = object\n+    mock_gitlab.Gitlab.return_value.projects.get.return_value = object\n     seeker = FileLookup()\n-\n-    assert seeker.project_id == project_id\n+    assert seeker.project == project_id\n \n \n @mock.patch('foremast.utils.lookups.gitlab')\n def test_get(gitlab):\n     \"\"\"Check _get_ method.\"\"\"\n     my_git = FileLookup()\n \n-    my_git.server.getfile.return_value = {'content': base64.b64encode(TEST_JSON_BYTES)}\n-\n-    result = my_git.get()\n-    assert isinstance(result, str)\n-    assert TEST_JSON == my_git.get()\n+    with mock.patch.object(FileLookup, 'remote_file', return_value=TEST_JSON) as mock_method:\n+        result = my_git.get()\n+        assert isinstance(result, str)\n+        assert TEST_JSON == my_git.get()\n \n \n @mock.patch('foremast.utils.lookups.gitlab')\n def test_json(gitlab):\n     \"\"\"Check _json_ method.\"\"\"\n     my_git = FileLookup()\n \n-    my_git.server.getfile.return_value = {'content': base64.b64encode(TEST_JSON_BYTES)}\n-\n-    result = my_git.json()\n-    assert isinstance(result, dict)\n-    assert result['ship'] == 'pirate'\n+    with mock.patch.object(FileLookup, 'get', return_value=TEST_JSON) as mock_method:","path":"tests/utils/test_file_lookups.py","position":61,"original_position":61,"commit_id":"02449fcac31869f9a9e7373cc46a9853decd75b3","original_commit_id":"02449fcac31869f9a9e7373cc46a9853decd75b3","user":{"login":"e4r7hbug","id":590663,"avatar_url":"https://avatars3.githubusercontent.com/u/590663?v=4","gravatar_id":"","url":"https://api.github.com/users/e4r7hbug","html_url":"https://github.com/e4r7hbug","followers_url":"https://api.github.com/users/e4r7hbug/followers","following_url":"https://api.github.com/users/e4r7hbug/following{/other_user}","gists_url":"https://api.github.com/users/e4r7hbug/gists{/gist_id}","starred_url":"https://api.github.com/users/e4r7hbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e4r7hbug/subscriptions","organizations_url":"https://api.github.com/users/e4r7hbug/orgs","repos_url":"https://api.github.com/users/e4r7hbug/repos","events_url":"https://api.github.com/users/e4r7hbug/events{/privacy}","received_events_url":"https://api.github.com/users/e4r7hbug/received_events","type":"User","site_admin":false},"body":"Use decorator and `assert_called_with()` like above.","created_at":"2018-02-16T23:08:46Z","updated_at":"2018-02-16T23:12:34Z","html_url":"https://github.com/gogoair/foremast/pull/270#discussion_r168893040","pull_request_url":"https://api.github.com/repos/gogoair/foremast/pulls/270","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gogoair/foremast/pulls/comments/168893040"},"html":{"href":"https://github.com/gogoair/foremast/pull/270#discussion_r168893040"},"pull_request":{"href":"https://api.github.com/repos/gogoair/foremast/pulls/270"}}},"pull_request":{"url":"https://api.github.com/repos/gogoair/foremast/pulls/270","id":169566872,"html_url":"https://github.com/gogoair/foremast/pull/270","diff_url":"https://github.com/gogoair/foremast/pull/270.diff","patch_url":"https://github.com/gogoair/foremast/pull/270.patch","issue_url":"https://api.github.com/repos/gogoair/foremast/issues/270","number":270,"state":"open","locked":false,"title":"Use gitlab v4 api","user":{"login":"sijis","id":618177,"avatar_url":"https://avatars2.githubusercontent.com/u/618177?v=4","gravatar_id":"","url":"https://api.github.com/users/sijis","html_url":"https://github.com/sijis","followers_url":"https://api.github.com/users/sijis/followers","following_url":"https://api.github.com/users/sijis/following{/other_user}","gists_url":"https://api.github.com/users/sijis/gists{/gist_id}","starred_url":"https://api.github.com/users/sijis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sijis/subscriptions","organizations_url":"https://api.github.com/users/sijis/orgs","repos_url":"https://api.github.com/users/sijis/repos","events_url":"https://api.github.com/users/sijis/events{/privacy}","received_events_url":"https://api.github.com/users/sijis/received_events","type":"User","site_admin":false},"body":"We should use version 4 of gitlab api. The api v3 will be removed in a future version later this year.","created_at":"2018-02-16T08:11:19Z","updated_at":"2018-02-16T23:12:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"833a2789cee09950e01df0a5319c380aefc115b5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"bazimov","id":8669534,"avatar_url":"https://avatars1.githubusercontent.com/u/8669534?v=4","gravatar_id":"","url":"https://api.github.com/users/bazimov","html_url":"https://github.com/bazimov","followers_url":"https://api.github.com/users/bazimov/followers","following_url":"https://api.github.com/users/bazimov/following{/other_user}","gists_url":"https://api.github.com/users/bazimov/gists{/gist_id}","starred_url":"https://api.github.com/users/bazimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bazimov/subscriptions","organizations_url":"https://api.github.com/users/bazimov/orgs","repos_url":"https://api.github.com/users/bazimov/repos","events_url":"https://api.github.com/users/bazimov/events{/privacy}","received_events_url":"https://api.github.com/users/bazimov/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gogoair/foremast/pulls/270/commits","review_comments_url":"https://api.github.com/repos/gogoair/foremast/pulls/270/comments","review_comment_url":"https://api.github.com/repos/gogoair/foremast/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gogoair/foremast/issues/270/comments","statuses_url":"https://api.github.com/repos/gogoair/foremast/statuses/02449fcac31869f9a9e7373cc46a9853decd75b3","head":{"label":"sijis:fix/gitlab_v4","ref":"fix/gitlab_v4","sha":"02449fcac31869f9a9e7373cc46a9853decd75b3","user":{"login":"sijis","id":618177,"avatar_url":"https://avatars2.githubusercontent.com/u/618177?v=4","gravatar_id":"","url":"https://api.github.com/users/sijis","html_url":"https://github.com/sijis","followers_url":"https://api.github.com/users/sijis/followers","following_url":"https://api.github.com/users/sijis/following{/other_user}","gists_url":"https://api.github.com/users/sijis/gists{/gist_id}","starred_url":"https://api.github.com/users/sijis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sijis/subscriptions","organizations_url":"https://api.github.com/users/sijis/orgs","repos_url":"https://api.github.com/users/sijis/repos","events_url":"https://api.github.com/users/sijis/events{/privacy}","received_events_url":"https://api.github.com/users/sijis/received_events","type":"User","site_admin":false},"repo":{"id":84100337,"name":"foremast","full_name":"sijis/foremast","owner":{"login":"sijis","id":618177,"avatar_url":"https://avatars2.githubusercontent.com/u/618177?v=4","gravatar_id":"","url":"https://api.github.com/users/sijis","html_url":"https://github.com/sijis","followers_url":"https://api.github.com/users/sijis/followers","following_url":"https://api.github.com/users/sijis/following{/other_user}","gists_url":"https://api.github.com/users/sijis/gists{/gist_id}","starred_url":"https://api.github.com/users/sijis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sijis/subscriptions","organizations_url":"https://api.github.com/users/sijis/orgs","repos_url":"https://api.github.com/users/sijis/repos","events_url":"https://api.github.com/users/sijis/events{/privacy}","received_events_url":"https://api.github.com/users/sijis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sijis/foremast","description":"Spinnaker pipeline and infrastructure configuration and templating tool - Pipelines as Code.","fork":true,"url":"https://api.github.com/repos/sijis/foremast","forks_url":"https://api.github.com/repos/sijis/foremast/forks","keys_url":"https://api.github.com/repos/sijis/foremast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sijis/foremast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sijis/foremast/teams","hooks_url":"https://api.github.com/repos/sijis/foremast/hooks","issue_events_url":"https://api.github.com/repos/sijis/foremast/issues/events{/number}","events_url":"https://api.github.com/repos/sijis/foremast/events","assignees_url":"https://api.github.com/repos/sijis/foremast/assignees{/user}","branches_url":"https://api.github.com/repos/sijis/foremast/branches{/branch}","tags_url":"https://api.github.com/repos/sijis/foremast/tags","blobs_url":"https://api.github.com/repos/sijis/foremast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sijis/foremast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sijis/foremast/git/refs{/sha}","trees_url":"https://api.github.com/repos/sijis/foremast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sijis/foremast/statuses/{sha}","languages_url":"https://api.github.com/repos/sijis/foremast/languages","stargazers_url":"https://api.github.com/repos/sijis/foremast/stargazers","contributors_url":"https://api.github.com/repos/sijis/foremast/contributors","subscribers_url":"https://api.github.com/repos/sijis/foremast/subscribers","subscription_url":"https://api.github.com/repos/sijis/foremast/subscription","commits_url":"https://api.github.com/repos/sijis/foremast/commits{/sha}","git_commits_url":"https://api.github.com/repos/sijis/foremast/git/commits{/sha}","comments_url":"https://api.github.com/repos/sijis/foremast/comments{/number}","issue_comment_url":"https://api.github.com/repos/sijis/foremast/issues/comments{/number}","contents_url":"https://api.github.com/repos/sijis/foremast/contents/{+path}","compare_url":"https://api.github.com/repos/sijis/foremast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sijis/foremast/merges","archive_url":"https://api.github.com/repos/sijis/foremast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sijis/foremast/downloads","issues_url":"https://api.github.com/repos/sijis/foremast/issues{/number}","pulls_url":"https://api.github.com/repos/sijis/foremast/pulls{/number}","milestones_url":"https://api.github.com/repos/sijis/foremast/milestones{/number}","notifications_url":"https://api.github.com/repos/sijis/foremast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sijis/foremast/labels{/name}","releases_url":"https://api.github.com/repos/sijis/foremast/releases{/id}","deployments_url":"https://api.github.com/repos/sijis/foremast/deployments","created_at":"2017-03-06T17:15:27Z","updated_at":"2017-03-06T17:15:29Z","pushed_at":"2018-02-16T16:41:33Z","git_url":"git://github.com/sijis/foremast.git","ssh_url":"git@github.com:sijis/foremast.git","clone_url":"https://github.com/sijis/foremast.git","svn_url":"https://github.com/sijis/foremast","homepage":"http://foremast.readthedocs.io/","size":2090,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gogoair:master","ref":"master","sha":"b557a9f746e1981850729c4601efb4cc209d3473","user":{"login":"gogoair","id":20562622,"avatar_url":"https://avatars1.githubusercontent.com/u/20562622?v=4","gravatar_id":"","url":"https://api.github.com/users/gogoair","html_url":"https://github.com/gogoair","followers_url":"https://api.github.com/users/gogoair/followers","following_url":"https://api.github.com/users/gogoair/following{/other_user}","gists_url":"https://api.github.com/users/gogoair/gists{/gist_id}","starred_url":"https://api.github.com/users/gogoair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogoair/subscriptions","organizations_url":"https://api.github.com/users/gogoair/orgs","repos_url":"https://api.github.com/users/gogoair/repos","events_url":"https://api.github.com/users/gogoair/events{/privacy}","received_events_url":"https://api.github.com/users/gogoair/received_events","type":"Organization","site_admin":false},"repo":{"id":65238442,"name":"foremast","full_name":"gogoair/foremast","owner":{"login":"gogoair","id":20562622,"avatar_url":"https://avatars1.githubusercontent.com/u/20562622?v=4","gravatar_id":"","url":"https://api.github.com/users/gogoair","html_url":"https://github.com/gogoair","followers_url":"https://api.github.com/users/gogoair/followers","following_url":"https://api.github.com/users/gogoair/following{/other_user}","gists_url":"https://api.github.com/users/gogoair/gists{/gist_id}","starred_url":"https://api.github.com/users/gogoair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogoair/subscriptions","organizations_url":"https://api.github.com/users/gogoair/orgs","repos_url":"https://api.github.com/users/gogoair/repos","events_url":"https://api.github.com/users/gogoair/events{/privacy}","received_events_url":"https://api.github.com/users/gogoair/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gogoair/foremast","description":"Spinnaker pipeline and infrastructure configuration and templating tool - Pipelines as Code.","fork":false,"url":"https://api.github.com/repos/gogoair/foremast","forks_url":"https://api.github.com/repos/gogoair/foremast/forks","keys_url":"https://api.github.com/repos/gogoair/foremast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gogoair/foremast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gogoair/foremast/teams","hooks_url":"https://api.github.com/repos/gogoair/foremast/hooks","issue_events_url":"https://api.github.com/repos/gogoair/foremast/issues/events{/number}","events_url":"https://api.github.com/repos/gogoair/foremast/events","assignees_url":"https://api.github.com/repos/gogoair/foremast/assignees{/user}","branches_url":"https://api.github.com/repos/gogoair/foremast/branches{/branch}","tags_url":"https://api.github.com/repos/gogoair/foremast/tags","blobs_url":"https://api.github.com/repos/gogoair/foremast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gogoair/foremast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gogoair/foremast/git/refs{/sha}","trees_url":"https://api.github.com/repos/gogoair/foremast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gogoair/foremast/statuses/{sha}","languages_url":"https://api.github.com/repos/gogoair/foremast/languages","stargazers_url":"https://api.github.com/repos/gogoair/foremast/stargazers","contributors_url":"https://api.github.com/repos/gogoair/foremast/contributors","subscribers_url":"https://api.github.com/repos/gogoair/foremast/subscribers","subscription_url":"https://api.github.com/repos/gogoair/foremast/subscription","commits_url":"https://api.github.com/repos/gogoair/foremast/commits{/sha}","git_commits_url":"https://api.github.com/repos/gogoair/foremast/git/commits{/sha}","comments_url":"https://api.github.com/repos/gogoair/foremast/comments{/number}","issue_comment_url":"https://api.github.com/repos/gogoair/foremast/issues/comments{/number}","contents_url":"https://api.github.com/repos/gogoair/foremast/contents/{+path}","compare_url":"https://api.github.com/repos/gogoair/foremast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gogoair/foremast/merges","archive_url":"https://api.github.com/repos/gogoair/foremast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gogoair/foremast/downloads","issues_url":"https://api.github.com/repos/gogoair/foremast/issues{/number}","pulls_url":"https://api.github.com/repos/gogoair/foremast/pulls{/number}","milestones_url":"https://api.github.com/repos/gogoair/foremast/milestones{/number}","notifications_url":"https://api.github.com/repos/gogoair/foremast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gogoair/foremast/labels{/name}","releases_url":"https://api.github.com/repos/gogoair/foremast/releases{/id}","deployments_url":"https://api.github.com/repos/gogoair/foremast/deployments","created_at":"2016-08-08T20:52:07Z","updated_at":"2018-02-12T12:18:07Z","pushed_at":"2018-02-16T16:41:34Z","git_url":"git://github.com/gogoair/foremast.git","ssh_url":"git@github.com:gogoair/foremast.git","clone_url":"https://github.com/gogoair/foremast.git","svn_url":"https://github.com/gogoair/foremast","homepage":"http://foremast.readthedocs.io/","size":2135,"stargazers_count":125,"watchers_count":125,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":26,"open_issues":38,"watchers":125,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gogoair/foremast/pulls/270"},"html":{"href":"https://github.com/gogoair/foremast/pull/270"},"issue":{"href":"https://api.github.com/repos/gogoair/foremast/issues/270"},"comments":{"href":"https://api.github.com/repos/gogoair/foremast/issues/270/comments"},"review_comments":{"href":"https://api.github.com/repos/gogoair/foremast/pulls/270/comments"},"review_comment":{"href":"https://api.github.com/repos/gogoair/foremast/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gogoair/foremast/pulls/270/commits"},"statuses":{"href":"https://api.github.com/repos/gogoair/foremast/statuses/02449fcac31869f9a9e7373cc46a9853decd75b3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"e4r7hbug"}}