{"action":"created","comment":{"url":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/comments/169389102","pull_request_review_id":97907860,"id":169389102,"diff_hunk":"@@ -0,0 +1,71 @@\n+from io import BytesIO\n+from typing import Optional\n+import pytest\n+from azure.storage.blob import BlockBlobService\n+from azure_utils import StorageCoordinates, upload_stream_to_azure\n+\n+\n+@pytest.fixture\n+def sample_account() -> str:\n+    return 'devstoreaccount1'\n+\n+\n+@pytest.fixture\n+def sample_key() -> str:\n+    return 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='\n+\n+\n+@pytest.fixture\n+def sample_container() -> str:\n+    return 'energuide-extracted-data'\n+\n+\n+@pytest.fixture\n+def sample_domain() -> Optional[str]:\n+    return 'http://127.0.0.1:10000/devstoreaccount1'\n+\n+\n+@pytest.fixture\n+def sample_storage_coordinates(sample_account: str,\n+                               sample_key: str,\n+                               sample_container: str,\n+                               sample_domain: Optional[str]) -> StorageCoordinates:\n+    return StorageCoordinates(account=sample_account, key=sample_key, container=sample_container, domain=sample_domain)\n+\n+\n+@pytest.fixture\n+def sample_block_blob_service(sample_storage_coordinates: StorageCoordinates) -> BlockBlobService:\n+    account, key, _, domain = sample_storage_coordinates","path":"extract_endpoint/tests/test_azure_utils.py","position":38,"original_position":38,"commit_id":"505347ccdee21eeef22d9792ae0b8f60281148d3","original_commit_id":"505347ccdee21eeef22d9792ae0b8f60281148d3","user":{"login":"JasonMWhite","id":2893818,"avatar_url":"https://avatars1.githubusercontent.com/u/2893818?v=4","gravatar_id":"","url":"https://api.github.com/users/JasonMWhite","html_url":"https://github.com/JasonMWhite","followers_url":"https://api.github.com/users/JasonMWhite/followers","following_url":"https://api.github.com/users/JasonMWhite/following{/other_user}","gists_url":"https://api.github.com/users/JasonMWhite/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonMWhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonMWhite/subscriptions","organizations_url":"https://api.github.com/users/JasonMWhite/orgs","repos_url":"https://api.github.com/users/JasonMWhite/repos","events_url":"https://api.github.com/users/JasonMWhite/events{/privacy}","received_events_url":"https://api.github.com/users/JasonMWhite/received_events","type":"User","site_admin":false},"body":"This is actually a bit dangerous. It will break if someone adds a new field to `StorageCoordinates`.","created_at":"2018-02-20T17:03:03Z","updated_at":"2018-02-20T17:03:03Z","html_url":"https://github.com/cds-snc/nrcan_api/pull/197#discussion_r169389102","pull_request_url":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/197","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/comments/169389102"},"html":{"href":"https://github.com/cds-snc/nrcan_api/pull/197#discussion_r169389102"},"pull_request":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/197"}}},"pull_request":{"url":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/197","id":169725144,"html_url":"https://github.com/cds-snc/nrcan_api/pull/197","diff_url":"https://github.com/cds-snc/nrcan_api/pull/197.diff","patch_url":"https://github.com/cds-snc/nrcan_api/pull/197.patch","issue_url":"https://api.github.com/repos/cds-snc/nrcan_api/issues/197","number":197,"state":"open","locked":false,"title":"Add azure utils","user":{"login":"sastels","id":8228248,"avatar_url":"https://avatars2.githubusercontent.com/u/8228248?v=4","gravatar_id":"","url":"https://api.github.com/users/sastels","html_url":"https://github.com/sastels","followers_url":"https://api.github.com/users/sastels/followers","following_url":"https://api.github.com/users/sastels/following{/other_user}","gists_url":"https://api.github.com/users/sastels/gists{/gist_id}","starred_url":"https://api.github.com/users/sastels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sastels/subscriptions","organizations_url":"https://api.github.com/users/sastels/orgs","repos_url":"https://api.github.com/users/sastels/repos","events_url":"https://api.github.com/users/sastels/events{/privacy}","received_events_url":"https://api.github.com/users/sastels/received_events","type":"User","site_admin":false},"body":"Add and test code to push to Microsoft Azure.\r\n\r\n~~Currently the test uses the real Azure (with keys in the local environment). Emulator code will be added.~~","created_at":"2018-02-16T21:03:35Z","updated_at":"2018-02-20T17:03:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ab2796da516a3fcfff7cdbc46a0a88c8a840dab","assignee":null,"assignees":[],"requested_reviewers":[{"login":"evadb","id":1545806,"avatar_url":"https://avatars0.githubusercontent.com/u/1545806?v=4","gravatar_id":"","url":"https://api.github.com/users/evadb","html_url":"https://github.com/evadb","followers_url":"https://api.github.com/users/evadb/followers","following_url":"https://api.github.com/users/evadb/following{/other_user}","gists_url":"https://api.github.com/users/evadb/gists{/gist_id}","starred_url":"https://api.github.com/users/evadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evadb/subscriptions","organizations_url":"https://api.github.com/users/evadb/orgs","repos_url":"https://api.github.com/users/evadb/repos","events_url":"https://api.github.com/users/evadb/events{/privacy}","received_events_url":"https://api.github.com/users/evadb/received_events","type":"User","site_admin":false},{"login":"buckley-w-david","id":1952571,"avatar_url":"https://avatars0.githubusercontent.com/u/1952571?v=4","gravatar_id":"","url":"https://api.github.com/users/buckley-w-david","html_url":"https://github.com/buckley-w-david","followers_url":"https://api.github.com/users/buckley-w-david/followers","following_url":"https://api.github.com/users/buckley-w-david/following{/other_user}","gists_url":"https://api.github.com/users/buckley-w-david/gists{/gist_id}","starred_url":"https://api.github.com/users/buckley-w-david/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buckley-w-david/subscriptions","organizations_url":"https://api.github.com/users/buckley-w-david/orgs","repos_url":"https://api.github.com/users/buckley-w-david/repos","events_url":"https://api.github.com/users/buckley-w-david/events{/privacy}","received_events_url":"https://api.github.com/users/buckley-w-david/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/197/commits","review_comments_url":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/197/comments","review_comment_url":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cds-snc/nrcan_api/issues/197/comments","statuses_url":"https://api.github.com/repos/cds-snc/nrcan_api/statuses/505347ccdee21eeef22d9792ae0b8f60281148d3","head":{"label":"cds-snc:add_azure_utils","ref":"add_azure_utils","sha":"505347ccdee21eeef22d9792ae0b8f60281148d3","user":{"login":"cds-snc","id":30166251,"avatar_url":"https://avatars1.githubusercontent.com/u/30166251?v=4","gravatar_id":"","url":"https://api.github.com/users/cds-snc","html_url":"https://github.com/cds-snc","followers_url":"https://api.github.com/users/cds-snc/followers","following_url":"https://api.github.com/users/cds-snc/following{/other_user}","gists_url":"https://api.github.com/users/cds-snc/gists{/gist_id}","starred_url":"https://api.github.com/users/cds-snc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cds-snc/subscriptions","organizations_url":"https://api.github.com/users/cds-snc/orgs","repos_url":"https://api.github.com/users/cds-snc/repos","events_url":"https://api.github.com/users/cds-snc/events{/privacy}","received_events_url":"https://api.github.com/users/cds-snc/received_events","type":"Organization","site_admin":false},"repo":{"id":111843247,"name":"nrcan_api","full_name":"cds-snc/nrcan_api","owner":{"login":"cds-snc","id":30166251,"avatar_url":"https://avatars1.githubusercontent.com/u/30166251?v=4","gravatar_id":"","url":"https://api.github.com/users/cds-snc","html_url":"https://github.com/cds-snc","followers_url":"https://api.github.com/users/cds-snc/followers","following_url":"https://api.github.com/users/cds-snc/following{/other_user}","gists_url":"https://api.github.com/users/cds-snc/gists{/gist_id}","starred_url":"https://api.github.com/users/cds-snc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cds-snc/subscriptions","organizations_url":"https://api.github.com/users/cds-snc/orgs","repos_url":"https://api.github.com/users/cds-snc/repos","events_url":"https://api.github.com/users/cds-snc/events{/privacy}","received_events_url":"https://api.github.com/users/cds-snc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cds-snc/nrcan_api","description":"An API for Natural Resources Canada's Energuide data.","fork":false,"url":"https://api.github.com/repos/cds-snc/nrcan_api","forks_url":"https://api.github.com/repos/cds-snc/nrcan_api/forks","keys_url":"https://api.github.com/repos/cds-snc/nrcan_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cds-snc/nrcan_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cds-snc/nrcan_api/teams","hooks_url":"https://api.github.com/repos/cds-snc/nrcan_api/hooks","issue_events_url":"https://api.github.com/repos/cds-snc/nrcan_api/issues/events{/number}","events_url":"https://api.github.com/repos/cds-snc/nrcan_api/events","assignees_url":"https://api.github.com/repos/cds-snc/nrcan_api/assignees{/user}","branches_url":"https://api.github.com/repos/cds-snc/nrcan_api/branches{/branch}","tags_url":"https://api.github.com/repos/cds-snc/nrcan_api/tags","blobs_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cds-snc/nrcan_api/statuses/{sha}","languages_url":"https://api.github.com/repos/cds-snc/nrcan_api/languages","stargazers_url":"https://api.github.com/repos/cds-snc/nrcan_api/stargazers","contributors_url":"https://api.github.com/repos/cds-snc/nrcan_api/contributors","subscribers_url":"https://api.github.com/repos/cds-snc/nrcan_api/subscribers","subscription_url":"https://api.github.com/repos/cds-snc/nrcan_api/subscription","commits_url":"https://api.github.com/repos/cds-snc/nrcan_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/cds-snc/nrcan_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/cds-snc/nrcan_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/cds-snc/nrcan_api/contents/{+path}","compare_url":"https://api.github.com/repos/cds-snc/nrcan_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cds-snc/nrcan_api/merges","archive_url":"https://api.github.com/repos/cds-snc/nrcan_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cds-snc/nrcan_api/downloads","issues_url":"https://api.github.com/repos/cds-snc/nrcan_api/issues{/number}","pulls_url":"https://api.github.com/repos/cds-snc/nrcan_api/pulls{/number}","milestones_url":"https://api.github.com/repos/cds-snc/nrcan_api/milestones{/number}","notifications_url":"https://api.github.com/repos/cds-snc/nrcan_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cds-snc/nrcan_api/labels{/name}","releases_url":"https://api.github.com/repos/cds-snc/nrcan_api/releases{/id}","deployments_url":"https://api.github.com/repos/cds-snc/nrcan_api/deployments","created_at":"2017-11-23T19:19:13Z","updated_at":"2018-02-06T16:20:44Z","pushed_at":"2018-02-20T17:01:36Z","git_url":"git://github.com/cds-snc/nrcan_api.git","ssh_url":"git@github.com:cds-snc/nrcan_api.git","clone_url":"https://github.com/cds-snc/nrcan_api.git","svn_url":"https://github.com/cds-snc/nrcan_api","homepage":null,"size":1255,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"cds-snc:master","ref":"master","sha":"8412a4f40d77288841b7646f03b25de2cadd6d90","user":{"login":"cds-snc","id":30166251,"avatar_url":"https://avatars1.githubusercontent.com/u/30166251?v=4","gravatar_id":"","url":"https://api.github.com/users/cds-snc","html_url":"https://github.com/cds-snc","followers_url":"https://api.github.com/users/cds-snc/followers","following_url":"https://api.github.com/users/cds-snc/following{/other_user}","gists_url":"https://api.github.com/users/cds-snc/gists{/gist_id}","starred_url":"https://api.github.com/users/cds-snc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cds-snc/subscriptions","organizations_url":"https://api.github.com/users/cds-snc/orgs","repos_url":"https://api.github.com/users/cds-snc/repos","events_url":"https://api.github.com/users/cds-snc/events{/privacy}","received_events_url":"https://api.github.com/users/cds-snc/received_events","type":"Organization","site_admin":false},"repo":{"id":111843247,"name":"nrcan_api","full_name":"cds-snc/nrcan_api","owner":{"login":"cds-snc","id":30166251,"avatar_url":"https://avatars1.githubusercontent.com/u/30166251?v=4","gravatar_id":"","url":"https://api.github.com/users/cds-snc","html_url":"https://github.com/cds-snc","followers_url":"https://api.github.com/users/cds-snc/followers","following_url":"https://api.github.com/users/cds-snc/following{/other_user}","gists_url":"https://api.github.com/users/cds-snc/gists{/gist_id}","starred_url":"https://api.github.com/users/cds-snc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cds-snc/subscriptions","organizations_url":"https://api.github.com/users/cds-snc/orgs","repos_url":"https://api.github.com/users/cds-snc/repos","events_url":"https://api.github.com/users/cds-snc/events{/privacy}","received_events_url":"https://api.github.com/users/cds-snc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cds-snc/nrcan_api","description":"An API for Natural Resources Canada's Energuide data.","fork":false,"url":"https://api.github.com/repos/cds-snc/nrcan_api","forks_url":"https://api.github.com/repos/cds-snc/nrcan_api/forks","keys_url":"https://api.github.com/repos/cds-snc/nrcan_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cds-snc/nrcan_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cds-snc/nrcan_api/teams","hooks_url":"https://api.github.com/repos/cds-snc/nrcan_api/hooks","issue_events_url":"https://api.github.com/repos/cds-snc/nrcan_api/issues/events{/number}","events_url":"https://api.github.com/repos/cds-snc/nrcan_api/events","assignees_url":"https://api.github.com/repos/cds-snc/nrcan_api/assignees{/user}","branches_url":"https://api.github.com/repos/cds-snc/nrcan_api/branches{/branch}","tags_url":"https://api.github.com/repos/cds-snc/nrcan_api/tags","blobs_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cds-snc/nrcan_api/statuses/{sha}","languages_url":"https://api.github.com/repos/cds-snc/nrcan_api/languages","stargazers_url":"https://api.github.com/repos/cds-snc/nrcan_api/stargazers","contributors_url":"https://api.github.com/repos/cds-snc/nrcan_api/contributors","subscribers_url":"https://api.github.com/repos/cds-snc/nrcan_api/subscribers","subscription_url":"https://api.github.com/repos/cds-snc/nrcan_api/subscription","commits_url":"https://api.github.com/repos/cds-snc/nrcan_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/cds-snc/nrcan_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/cds-snc/nrcan_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/cds-snc/nrcan_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/cds-snc/nrcan_api/contents/{+path}","compare_url":"https://api.github.com/repos/cds-snc/nrcan_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cds-snc/nrcan_api/merges","archive_url":"https://api.github.com/repos/cds-snc/nrcan_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cds-snc/nrcan_api/downloads","issues_url":"https://api.github.com/repos/cds-snc/nrcan_api/issues{/number}","pulls_url":"https://api.github.com/repos/cds-snc/nrcan_api/pulls{/number}","milestones_url":"https://api.github.com/repos/cds-snc/nrcan_api/milestones{/number}","notifications_url":"https://api.github.com/repos/cds-snc/nrcan_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cds-snc/nrcan_api/labels{/name}","releases_url":"https://api.github.com/repos/cds-snc/nrcan_api/releases{/id}","deployments_url":"https://api.github.com/repos/cds-snc/nrcan_api/deployments","created_at":"2017-11-23T19:19:13Z","updated_at":"2018-02-06T16:20:44Z","pushed_at":"2018-02-20T17:01:36Z","git_url":"git://github.com/cds-snc/nrcan_api.git","ssh_url":"git@github.com:cds-snc/nrcan_api.git","clone_url":"https://github.com/cds-snc/nrcan_api.git","svn_url":"https://github.com/cds-snc/nrcan_api","homepage":null,"size":1255,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/197"},"html":{"href":"https://github.com/cds-snc/nrcan_api/pull/197"},"issue":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/issues/197"},"comments":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/issues/197/comments"},"review_comments":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/197/comments"},"review_comment":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/pulls/197/commits"},"statuses":{"href":"https://api.github.com/repos/cds-snc/nrcan_api/statuses/505347ccdee21eeef22d9792ae0b8f60281148d3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"JasonMWhite"}}