{"action":"created","comment":{"url":"https://api.github.com/repos/mushorg/tanner/pulls/comments/177160605","pull_request_review_id":106986191,"id":177160605,"diff_hunk":"@@ -19,8 +18,9 @@ def test_http_download_fail(self):\n         path = 'http://foobarfvfd'\n         filename = self.loop.run_until_complete(self.handler.download_file(path))\n         self.assertIsNone(filename)\n-\n+        \n     def test_ftp_download(self):\n+        self.handler.download_file_ftp = mock.MagicMock(return_value = '10ddd27e6bab5c8e2aa356906d1b71e5')\n         path = 'ftp://mirror.yandex.ru/archlinux/lastupdate'\n         data = self.loop.run_until_complete(self.handler.download_file(path))\n         self.assertIsNotNone(data)","path":"tanner/tests/test_rfi_emulation.py","position":21,"original_position":21,"commit_id":"9fd49ff68c07f0c9f124b3e16654fa5eee94506d","original_commit_id":"9fd49ff68c07f0c9f124b3e16654fa5eee94506d","user":{"login":"afeena","id":8390928,"avatar_url":"https://avatars3.githubusercontent.com/u/8390928?v=4","gravatar_id":"","url":"https://api.github.com/users/afeena","html_url":"https://github.com/afeena","followers_url":"https://api.github.com/users/afeena/followers","following_url":"https://api.github.com/users/afeena/following{/other_user}","gists_url":"https://api.github.com/users/afeena/gists{/gist_id}","starred_url":"https://api.github.com/users/afeena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afeena/subscriptions","organizations_url":"https://api.github.com/users/afeena/orgs","repos_url":"https://api.github.com/users/afeena/repos","events_url":"https://api.github.com/users/afeena/events{/privacy}","received_events_url":"https://api.github.com/users/afeena/received_events","type":"User","site_admin":false},"body":"I suggest you assert with exactly returned value for mocked function. It checks that mocked function was called and proper value was used in download_file function","created_at":"2018-03-26T16:49:53Z","updated_at":"2018-03-26T16:49:53Z","html_url":"https://github.com/mushorg/tanner/pull/236#discussion_r177160605","pull_request_url":"https://api.github.com/repos/mushorg/tanner/pulls/236","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mushorg/tanner/pulls/comments/177160605"},"html":{"href":"https://github.com/mushorg/tanner/pull/236#discussion_r177160605"},"pull_request":{"href":"https://api.github.com/repos/mushorg/tanner/pulls/236"}}},"pull_request":{"url":"https://api.github.com/repos/mushorg/tanner/pulls/236","id":177182834,"html_url":"https://github.com/mushorg/tanner/pull/236","diff_url":"https://github.com/mushorg/tanner/pull/236.diff","patch_url":"https://github.com/mushorg/tanner/pull/236.patch","issue_url":"https://api.github.com/repos/mushorg/tanner/issues/236","number":236,"state":"open","locked":false,"title":"Fix for Travis Error in ftp_download","user":{"login":"viskey98","id":29657395,"avatar_url":"https://avatars2.githubusercontent.com/u/29657395?v=4","gravatar_id":"","url":"https://api.github.com/users/viskey98","html_url":"https://github.com/viskey98","followers_url":"https://api.github.com/users/viskey98/followers","following_url":"https://api.github.com/users/viskey98/following{/other_user}","gists_url":"https://api.github.com/users/viskey98/gists{/gist_id}","starred_url":"https://api.github.com/users/viskey98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viskey98/subscriptions","organizations_url":"https://api.github.com/users/viskey98/orgs","repos_url":"https://api.github.com/users/viskey98/repos","events_url":"https://api.github.com/users/viskey98/events{/privacy}","received_events_url":"https://api.github.com/users/viskey98/received_events","type":"User","site_admin":false},"body":"Fixes issue: #234 \r\nThe unittest.mock have mocks only for normal functions. So I have used a custom function (AsyncMock) to mock the coroutine (handler.download()) behaviour. \r\nThis fix will successfully mock the ftp_download behaviour with the desired result, which can fix the travis error.\r\nPlease suggest any changes if required :) ","created_at":"2018-03-23T20:59:13Z","updated_at":"2018-03-26T16:49:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f0881e5922b70df09781d2fc9b014281ce12850","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mushorg/tanner/pulls/236/commits","review_comments_url":"https://api.github.com/repos/mushorg/tanner/pulls/236/comments","review_comment_url":"https://api.github.com/repos/mushorg/tanner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mushorg/tanner/issues/236/comments","statuses_url":"https://api.github.com/repos/mushorg/tanner/statuses/9fd49ff68c07f0c9f124b3e16654fa5eee94506d","head":{"label":"viskey98:#234-fix","ref":"#234-fix","sha":"9fd49ff68c07f0c9f124b3e16654fa5eee94506d","user":{"login":"viskey98","id":29657395,"avatar_url":"https://avatars2.githubusercontent.com/u/29657395?v=4","gravatar_id":"","url":"https://api.github.com/users/viskey98","html_url":"https://github.com/viskey98","followers_url":"https://api.github.com/users/viskey98/followers","following_url":"https://api.github.com/users/viskey98/following{/other_user}","gists_url":"https://api.github.com/users/viskey98/gists{/gist_id}","starred_url":"https://api.github.com/users/viskey98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viskey98/subscriptions","organizations_url":"https://api.github.com/users/viskey98/orgs","repos_url":"https://api.github.com/users/viskey98/repos","events_url":"https://api.github.com/users/viskey98/events{/privacy}","received_events_url":"https://api.github.com/users/viskey98/received_events","type":"User","site_admin":false},"repo":{"id":119707729,"name":"tanner","full_name":"viskey98/tanner","owner":{"login":"viskey98","id":29657395,"avatar_url":"https://avatars2.githubusercontent.com/u/29657395?v=4","gravatar_id":"","url":"https://api.github.com/users/viskey98","html_url":"https://github.com/viskey98","followers_url":"https://api.github.com/users/viskey98/followers","following_url":"https://api.github.com/users/viskey98/following{/other_user}","gists_url":"https://api.github.com/users/viskey98/gists{/gist_id}","starred_url":"https://api.github.com/users/viskey98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viskey98/subscriptions","organizations_url":"https://api.github.com/users/viskey98/orgs","repos_url":"https://api.github.com/users/viskey98/repos","events_url":"https://api.github.com/users/viskey98/events{/privacy}","received_events_url":"https://api.github.com/users/viskey98/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/viskey98/tanner","description":"He who flays the hide","fork":true,"url":"https://api.github.com/repos/viskey98/tanner","forks_url":"https://api.github.com/repos/viskey98/tanner/forks","keys_url":"https://api.github.com/repos/viskey98/tanner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/viskey98/tanner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/viskey98/tanner/teams","hooks_url":"https://api.github.com/repos/viskey98/tanner/hooks","issue_events_url":"https://api.github.com/repos/viskey98/tanner/issues/events{/number}","events_url":"https://api.github.com/repos/viskey98/tanner/events","assignees_url":"https://api.github.com/repos/viskey98/tanner/assignees{/user}","branches_url":"https://api.github.com/repos/viskey98/tanner/branches{/branch}","tags_url":"https://api.github.com/repos/viskey98/tanner/tags","blobs_url":"https://api.github.com/repos/viskey98/tanner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/viskey98/tanner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/viskey98/tanner/git/refs{/sha}","trees_url":"https://api.github.com/repos/viskey98/tanner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/viskey98/tanner/statuses/{sha}","languages_url":"https://api.github.com/repos/viskey98/tanner/languages","stargazers_url":"https://api.github.com/repos/viskey98/tanner/stargazers","contributors_url":"https://api.github.com/repos/viskey98/tanner/contributors","subscribers_url":"https://api.github.com/repos/viskey98/tanner/subscribers","subscription_url":"https://api.github.com/repos/viskey98/tanner/subscription","commits_url":"https://api.github.com/repos/viskey98/tanner/commits{/sha}","git_commits_url":"https://api.github.com/repos/viskey98/tanner/git/commits{/sha}","comments_url":"https://api.github.com/repos/viskey98/tanner/comments{/number}","issue_comment_url":"https://api.github.com/repos/viskey98/tanner/issues/comments{/number}","contents_url":"https://api.github.com/repos/viskey98/tanner/contents/{+path}","compare_url":"https://api.github.com/repos/viskey98/tanner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/viskey98/tanner/merges","archive_url":"https://api.github.com/repos/viskey98/tanner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/viskey98/tanner/downloads","issues_url":"https://api.github.com/repos/viskey98/tanner/issues{/number}","pulls_url":"https://api.github.com/repos/viskey98/tanner/pulls{/number}","milestones_url":"https://api.github.com/repos/viskey98/tanner/milestones{/number}","notifications_url":"https://api.github.com/repos/viskey98/tanner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/viskey98/tanner/labels{/name}","releases_url":"https://api.github.com/repos/viskey98/tanner/releases{/id}","deployments_url":"https://api.github.com/repos/viskey98/tanner/deployments","created_at":"2018-01-31T15:47:11Z","updated_at":"2018-03-20T09:41:40Z","pushed_at":"2018-03-26T12:27:09Z","git_url":"git://github.com/viskey98/tanner.git","ssh_url":"git@github.com:viskey98/tanner.git","clone_url":"https://github.com/viskey98/tanner.git","svn_url":"https://github.com/viskey98/tanner","homepage":null,"size":315,"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,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mushorg:master","ref":"master","sha":"44bcaef3a0a8cc8faa4a5d3064993bba75cddfe0","user":{"login":"mushorg","id":2742625,"avatar_url":"https://avatars3.githubusercontent.com/u/2742625?v=4","gravatar_id":"","url":"https://api.github.com/users/mushorg","html_url":"https://github.com/mushorg","followers_url":"https://api.github.com/users/mushorg/followers","following_url":"https://api.github.com/users/mushorg/following{/other_user}","gists_url":"https://api.github.com/users/mushorg/gists{/gist_id}","starred_url":"https://api.github.com/users/mushorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mushorg/subscriptions","organizations_url":"https://api.github.com/users/mushorg/orgs","repos_url":"https://api.github.com/users/mushorg/repos","events_url":"https://api.github.com/users/mushorg/events{/privacy}","received_events_url":"https://api.github.com/users/mushorg/received_events","type":"Organization","site_admin":false},"repo":{"id":40407153,"name":"tanner","full_name":"mushorg/tanner","owner":{"login":"mushorg","id":2742625,"avatar_url":"https://avatars3.githubusercontent.com/u/2742625?v=4","gravatar_id":"","url":"https://api.github.com/users/mushorg","html_url":"https://github.com/mushorg","followers_url":"https://api.github.com/users/mushorg/followers","following_url":"https://api.github.com/users/mushorg/following{/other_user}","gists_url":"https://api.github.com/users/mushorg/gists{/gist_id}","starred_url":"https://api.github.com/users/mushorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mushorg/subscriptions","organizations_url":"https://api.github.com/users/mushorg/orgs","repos_url":"https://api.github.com/users/mushorg/repos","events_url":"https://api.github.com/users/mushorg/events{/privacy}","received_events_url":"https://api.github.com/users/mushorg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mushorg/tanner","description":"He who flays the hide","fork":false,"url":"https://api.github.com/repos/mushorg/tanner","forks_url":"https://api.github.com/repos/mushorg/tanner/forks","keys_url":"https://api.github.com/repos/mushorg/tanner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mushorg/tanner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mushorg/tanner/teams","hooks_url":"https://api.github.com/repos/mushorg/tanner/hooks","issue_events_url":"https://api.github.com/repos/mushorg/tanner/issues/events{/number}","events_url":"https://api.github.com/repos/mushorg/tanner/events","assignees_url":"https://api.github.com/repos/mushorg/tanner/assignees{/user}","branches_url":"https://api.github.com/repos/mushorg/tanner/branches{/branch}","tags_url":"https://api.github.com/repos/mushorg/tanner/tags","blobs_url":"https://api.github.com/repos/mushorg/tanner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mushorg/tanner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mushorg/tanner/git/refs{/sha}","trees_url":"https://api.github.com/repos/mushorg/tanner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mushorg/tanner/statuses/{sha}","languages_url":"https://api.github.com/repos/mushorg/tanner/languages","stargazers_url":"https://api.github.com/repos/mushorg/tanner/stargazers","contributors_url":"https://api.github.com/repos/mushorg/tanner/contributors","subscribers_url":"https://api.github.com/repos/mushorg/tanner/subscribers","subscription_url":"https://api.github.com/repos/mushorg/tanner/subscription","commits_url":"https://api.github.com/repos/mushorg/tanner/commits{/sha}","git_commits_url":"https://api.github.com/repos/mushorg/tanner/git/commits{/sha}","comments_url":"https://api.github.com/repos/mushorg/tanner/comments{/number}","issue_comment_url":"https://api.github.com/repos/mushorg/tanner/issues/comments{/number}","contents_url":"https://api.github.com/repos/mushorg/tanner/contents/{+path}","compare_url":"https://api.github.com/repos/mushorg/tanner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mushorg/tanner/merges","archive_url":"https://api.github.com/repos/mushorg/tanner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mushorg/tanner/downloads","issues_url":"https://api.github.com/repos/mushorg/tanner/issues{/number}","pulls_url":"https://api.github.com/repos/mushorg/tanner/pulls{/number}","milestones_url":"https://api.github.com/repos/mushorg/tanner/milestones{/number}","notifications_url":"https://api.github.com/repos/mushorg/tanner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mushorg/tanner/labels{/name}","releases_url":"https://api.github.com/repos/mushorg/tanner/releases{/id}","deployments_url":"https://api.github.com/repos/mushorg/tanner/deployments","created_at":"2015-08-08T15:28:24Z","updated_at":"2018-03-25T11:48:44Z","pushed_at":"2018-03-26T12:27:10Z","git_url":"git://github.com/mushorg/tanner.git","ssh_url":"git@github.com:mushorg/tanner.git","clone_url":"https://github.com/mushorg/tanner.git","svn_url":"https://github.com/mushorg/tanner","homepage":null,"size":302,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":27,"open_issues":16,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mushorg/tanner/pulls/236"},"html":{"href":"https://github.com/mushorg/tanner/pull/236"},"issue":{"href":"https://api.github.com/repos/mushorg/tanner/issues/236"},"comments":{"href":"https://api.github.com/repos/mushorg/tanner/issues/236/comments"},"review_comments":{"href":"https://api.github.com/repos/mushorg/tanner/pulls/236/comments"},"review_comment":{"href":"https://api.github.com/repos/mushorg/tanner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mushorg/tanner/pulls/236/commits"},"statuses":{"href":"https://api.github.com/repos/mushorg/tanner/statuses/9fd49ff68c07f0c9f124b3e16654fa5eee94506d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"afeena"}}