{"action":"created","comment":{"url":"https://api.github.com/repos/icgc/icgc-download-client/pulls/comments/60759644","id":60759644,"diff_hunk":"@@ -0,0 +1,41 @@\n+import unittest\n+from lib.cli import icgc_download_client\n+from argparse import Namespace\n+import os\n+\n+\n+class TestCGHubMethods(unittest.TestCase):\n+\n+    def test_CGHub(self):\n+        args = Namespace(config=conf, file=['a337c425-4314-40c6-a40a-a444781bd1b7'], manifest=None, output=data_dir,\n+                         repo='cghub')\n+        icgc_download_client.call_client(args)\n+        file_info = os.stat(data_dir + 'a337c425-4314-40c6-a40a-a444781bd1b7/G28034.MDA-MB-361.1.bam')\n+        self.assertAlmostEqual(file_info.st_size, 5159984257, places=4)\n+\n+    def test_CGHub_double(self):\n+        args = Namespace(config=conf,\n+                         file=['a452b625-74f6-40b5-90f8-7fe6f32b89bd a105a6ec-7cc3-4c3b-a99f-af29de8a7caa'],\n+                         manifest=None, output=data_dir,repo='cghub')\n+        icgc_download_client.call_client(args)\n+        self.assertTrue(os.path.isfile(data_dir + 'a105a6ec-7cc3-4c3b-a99f-af29de8a7caa/C836.BICR_18.2.bam') and\n+                        os.path.isfile(data_dir + 'a452b625-74f6-40b5-90f8-7fe6f32b89bd/C836.PEER.1.bam'))\n+\n+    def test_GDC_manifest(self):\n+        args = Namespace(config=conf, file=None,\n+                         manifest=manifest_dir + 'gdc_manifest_1677e1a1e443d44e301239c10c7dc5d29c7f2658.txt',\n+                         output=data_dir, repo='cghub')\n+        icgc_download_client.call_client(args)\n+\n+        self.assertTrue(os.path.isfile(data_dir +\n+                                       '48016dd8-6033-4d73-8c85-f6eb1896e465/14-3-3_beta-R-V_GBL11066140.txt') and\n+                        os.path.isfile(data_dir +\n+                                       '71014f3d-6c29-4977-a5fa-568cbcbf8787/14-3-3_beta-R-V_GBL1114584.tif') and\n+                        os.path.isfile(data_dir +\n+                                       'cf1f6b6b-d6d8-4b0b-9ace-a344e088875e/14-3-3_beta-R-V_GBL1114584.txt'))\n+\n+if __name__ == '__main__':\n+    data_dir = '/Users/GavinWilson/git/icgc-download-client/mnt/downloads/'","path":"test/test_cghub.py","position":38,"original_position":38,"commit_id":"398544377472584cda574d60a9de5954aea780ba","original_commit_id":"398544377472584cda574d60a9de5954aea780ba","user":{"login":"btiernay","id":2717578,"avatar_url":"https://avatars.githubusercontent.com/u/2717578?v=3","gravatar_id":"","url":"https://api.github.com/users/btiernay","html_url":"https://github.com/btiernay","followers_url":"https://api.github.com/users/btiernay/followers","following_url":"https://api.github.com/users/btiernay/following{/other_user}","gists_url":"https://api.github.com/users/btiernay/gists{/gist_id}","starred_url":"https://api.github.com/users/btiernay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btiernay/subscriptions","organizations_url":"https://api.github.com/users/btiernay/orgs","repos_url":"https://api.github.com/users/btiernay/repos","events_url":"https://api.github.com/users/btiernay/events{/privacy}","received_events_url":"https://api.github.com/users/btiernay/received_events","type":"User","site_admin":false},"body":"Same","created_at":"2016-04-22T15:43:12Z","updated_at":"2016-04-22T15:43:12Z","html_url":"https://github.com/icgc/icgc-download-client/pull/2#discussion_r60759644","pull_request_url":"https://api.github.com/repos/icgc/icgc-download-client/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/icgc/icgc-download-client/pulls/comments/60759644"},"html":{"href":"https://github.com/icgc/icgc-download-client/pull/2#discussion_r60759644"},"pull_request":{"href":"https://api.github.com/repos/icgc/icgc-download-client/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/icgc/icgc-download-client/pulls/2","id":67213778,"html_url":"https://github.com/icgc/icgc-download-client/pull/2","diff_url":"https://github.com/icgc/icgc-download-client/pull/2.diff","patch_url":"https://github.com/icgc/icgc-download-client/pull/2.patch","issue_url":"https://api.github.com/repos/icgc/icgc-download-client/issues/2","number":2,"state":"open","locked":false,"title":"Feature/error code","user":{"login":"btiernay","id":2717578,"avatar_url":"https://avatars.githubusercontent.com/u/2717578?v=3","gravatar_id":"","url":"https://api.github.com/users/btiernay","html_url":"https://github.com/btiernay","followers_url":"https://api.github.com/users/btiernay/followers","following_url":"https://api.github.com/users/btiernay/following{/other_user}","gists_url":"https://api.github.com/users/btiernay/gists{/gist_id}","starred_url":"https://api.github.com/users/btiernay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btiernay/subscriptions","organizations_url":"https://api.github.com/users/btiernay/orgs","repos_url":"https://api.github.com/users/btiernay/repos","events_url":"https://api.github.com/users/btiernay/events{/privacy}","received_events_url":"https://api.github.com/users/btiernay/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-20T16:01:52Z","updated_at":"2016-04-22T15:43:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce2dc585721cad3b936b28de80b635119b49d16b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/icgc/icgc-download-client/pulls/2/commits","review_comments_url":"https://api.github.com/repos/icgc/icgc-download-client/pulls/2/comments","review_comment_url":"https://api.github.com/repos/icgc/icgc-download-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/icgc/icgc-download-client/issues/2/comments","statuses_url":"https://api.github.com/repos/icgc/icgc-download-client/statuses/398544377472584cda574d60a9de5954aea780ba","head":{"label":"icgc:feature/error_code","ref":"feature/error_code","sha":"398544377472584cda574d60a9de5954aea780ba","user":{"login":"icgc","id":14312020,"avatar_url":"https://avatars.githubusercontent.com/u/14312020?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc","html_url":"https://github.com/icgc","followers_url":"https://api.github.com/users/icgc/followers","following_url":"https://api.github.com/users/icgc/following{/other_user}","gists_url":"https://api.github.com/users/icgc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc/subscriptions","organizations_url":"https://api.github.com/users/icgc/orgs","repos_url":"https://api.github.com/users/icgc/repos","events_url":"https://api.github.com/users/icgc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc/received_events","type":"Organization","site_admin":false},"repo":{"id":55261799,"name":"icgc-download-client","full_name":"icgc/icgc-download-client","owner":{"login":"icgc","id":14312020,"avatar_url":"https://avatars.githubusercontent.com/u/14312020?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc","html_url":"https://github.com/icgc","followers_url":"https://api.github.com/users/icgc/followers","following_url":"https://api.github.com/users/icgc/following{/other_user}","gists_url":"https://api.github.com/users/icgc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc/subscriptions","organizations_url":"https://api.github.com/users/icgc/orgs","repos_url":"https://api.github.com/users/icgc/repos","events_url":"https://api.github.com/users/icgc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/icgc/icgc-download-client","description":"Universal download client for ICGC data residing in various environments","fork":false,"url":"https://api.github.com/repos/icgc/icgc-download-client","forks_url":"https://api.github.com/repos/icgc/icgc-download-client/forks","keys_url":"https://api.github.com/repos/icgc/icgc-download-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icgc/icgc-download-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icgc/icgc-download-client/teams","hooks_url":"https://api.github.com/repos/icgc/icgc-download-client/hooks","issue_events_url":"https://api.github.com/repos/icgc/icgc-download-client/issues/events{/number}","events_url":"https://api.github.com/repos/icgc/icgc-download-client/events","assignees_url":"https://api.github.com/repos/icgc/icgc-download-client/assignees{/user}","branches_url":"https://api.github.com/repos/icgc/icgc-download-client/branches{/branch}","tags_url":"https://api.github.com/repos/icgc/icgc-download-client/tags","blobs_url":"https://api.github.com/repos/icgc/icgc-download-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icgc/icgc-download-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icgc/icgc-download-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/icgc/icgc-download-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icgc/icgc-download-client/statuses/{sha}","languages_url":"https://api.github.com/repos/icgc/icgc-download-client/languages","stargazers_url":"https://api.github.com/repos/icgc/icgc-download-client/stargazers","contributors_url":"https://api.github.com/repos/icgc/icgc-download-client/contributors","subscribers_url":"https://api.github.com/repos/icgc/icgc-download-client/subscribers","subscription_url":"https://api.github.com/repos/icgc/icgc-download-client/subscription","commits_url":"https://api.github.com/repos/icgc/icgc-download-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/icgc/icgc-download-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/icgc/icgc-download-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/icgc/icgc-download-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/icgc/icgc-download-client/contents/{+path}","compare_url":"https://api.github.com/repos/icgc/icgc-download-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icgc/icgc-download-client/merges","archive_url":"https://api.github.com/repos/icgc/icgc-download-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icgc/icgc-download-client/downloads","issues_url":"https://api.github.com/repos/icgc/icgc-download-client/issues{/number}","pulls_url":"https://api.github.com/repos/icgc/icgc-download-client/pulls{/number}","milestones_url":"https://api.github.com/repos/icgc/icgc-download-client/milestones{/number}","notifications_url":"https://api.github.com/repos/icgc/icgc-download-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icgc/icgc-download-client/labels{/name}","releases_url":"https://api.github.com/repos/icgc/icgc-download-client/releases{/id}","deployments_url":"https://api.github.com/repos/icgc/icgc-download-client/deployments","created_at":"2016-04-01T20:55:06Z","updated_at":"2016-04-19T18:59:40Z","pushed_at":"2016-04-22T13:29:45Z","git_url":"git://github.com/icgc/icgc-download-client.git","ssh_url":"git@github.com:icgc/icgc-download-client.git","clone_url":"https://github.com/icgc/icgc-download-client.git","svn_url":"https://github.com/icgc/icgc-download-client","homepage":null,"size":99,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"icgc:develop","ref":"develop","sha":"4f321659bc4782a19fe47f49cc28c8183a88397f","user":{"login":"icgc","id":14312020,"avatar_url":"https://avatars.githubusercontent.com/u/14312020?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc","html_url":"https://github.com/icgc","followers_url":"https://api.github.com/users/icgc/followers","following_url":"https://api.github.com/users/icgc/following{/other_user}","gists_url":"https://api.github.com/users/icgc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc/subscriptions","organizations_url":"https://api.github.com/users/icgc/orgs","repos_url":"https://api.github.com/users/icgc/repos","events_url":"https://api.github.com/users/icgc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc/received_events","type":"Organization","site_admin":false},"repo":{"id":55261799,"name":"icgc-download-client","full_name":"icgc/icgc-download-client","owner":{"login":"icgc","id":14312020,"avatar_url":"https://avatars.githubusercontent.com/u/14312020?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc","html_url":"https://github.com/icgc","followers_url":"https://api.github.com/users/icgc/followers","following_url":"https://api.github.com/users/icgc/following{/other_user}","gists_url":"https://api.github.com/users/icgc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc/subscriptions","organizations_url":"https://api.github.com/users/icgc/orgs","repos_url":"https://api.github.com/users/icgc/repos","events_url":"https://api.github.com/users/icgc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/icgc/icgc-download-client","description":"Universal download client for ICGC data residing in various environments","fork":false,"url":"https://api.github.com/repos/icgc/icgc-download-client","forks_url":"https://api.github.com/repos/icgc/icgc-download-client/forks","keys_url":"https://api.github.com/repos/icgc/icgc-download-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icgc/icgc-download-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icgc/icgc-download-client/teams","hooks_url":"https://api.github.com/repos/icgc/icgc-download-client/hooks","issue_events_url":"https://api.github.com/repos/icgc/icgc-download-client/issues/events{/number}","events_url":"https://api.github.com/repos/icgc/icgc-download-client/events","assignees_url":"https://api.github.com/repos/icgc/icgc-download-client/assignees{/user}","branches_url":"https://api.github.com/repos/icgc/icgc-download-client/branches{/branch}","tags_url":"https://api.github.com/repos/icgc/icgc-download-client/tags","blobs_url":"https://api.github.com/repos/icgc/icgc-download-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icgc/icgc-download-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icgc/icgc-download-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/icgc/icgc-download-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icgc/icgc-download-client/statuses/{sha}","languages_url":"https://api.github.com/repos/icgc/icgc-download-client/languages","stargazers_url":"https://api.github.com/repos/icgc/icgc-download-client/stargazers","contributors_url":"https://api.github.com/repos/icgc/icgc-download-client/contributors","subscribers_url":"https://api.github.com/repos/icgc/icgc-download-client/subscribers","subscription_url":"https://api.github.com/repos/icgc/icgc-download-client/subscription","commits_url":"https://api.github.com/repos/icgc/icgc-download-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/icgc/icgc-download-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/icgc/icgc-download-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/icgc/icgc-download-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/icgc/icgc-download-client/contents/{+path}","compare_url":"https://api.github.com/repos/icgc/icgc-download-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icgc/icgc-download-client/merges","archive_url":"https://api.github.com/repos/icgc/icgc-download-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icgc/icgc-download-client/downloads","issues_url":"https://api.github.com/repos/icgc/icgc-download-client/issues{/number}","pulls_url":"https://api.github.com/repos/icgc/icgc-download-client/pulls{/number}","milestones_url":"https://api.github.com/repos/icgc/icgc-download-client/milestones{/number}","notifications_url":"https://api.github.com/repos/icgc/icgc-download-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icgc/icgc-download-client/labels{/name}","releases_url":"https://api.github.com/repos/icgc/icgc-download-client/releases{/id}","deployments_url":"https://api.github.com/repos/icgc/icgc-download-client/deployments","created_at":"2016-04-01T20:55:06Z","updated_at":"2016-04-19T18:59:40Z","pushed_at":"2016-04-22T13:29:45Z","git_url":"git://github.com/icgc/icgc-download-client.git","ssh_url":"git@github.com:icgc/icgc-download-client.git","clone_url":"https://github.com/icgc/icgc-download-client.git","svn_url":"https://github.com/icgc/icgc-download-client","homepage":null,"size":99,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/icgc/icgc-download-client/pulls/2"},"html":{"href":"https://github.com/icgc/icgc-download-client/pull/2"},"issue":{"href":"https://api.github.com/repos/icgc/icgc-download-client/issues/2"},"comments":{"href":"https://api.github.com/repos/icgc/icgc-download-client/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/icgc/icgc-download-client/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/icgc/icgc-download-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/icgc/icgc-download-client/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/icgc/icgc-download-client/statuses/398544377472584cda574d60a9de5954aea780ba"}}}}