{"action":"created","comment":{"url":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/comments/34940673","id":34940673,"diff_hunk":"@@ -15,16 +15,21 @@\n import json\n import unittest\n \n-from mock import patch, Mock, ANY\n+from mock import patch, ANY, call\n from netaddr import IPAddress, IPNetwork\n from nose.tools import assert_equal, assert_dict_equal\n+from subprocess32 import CalledProcessError\n \n from libnetwork_plugin import docker_plugin\n from pycalico.datastore_datatypes import Endpoint\n+from pycalico.datastore_errors import DataStoreError\n \n TEST_ENDPOINT_ID = \"TEST_ENDPOINT_ID\"\n TEST_NETWORK_ID = \"TEST_NETWORK_ID\"\n \n+# Expected 500 error response.\n+ERROR_RESPONSE_500 = {\"Err\": \"500: Internal Server Error\"}\n+\n #@TODO Misuse of Mock - when mocking out a function, safest to use patch.","path":"calico_containers/tests/unit/docker_plugin_test.py","position":20,"original_position":20,"commit_id":"3585df232458a2743affb31278955152400058ff","original_commit_id":"3585df232458a2743affb31278955152400058ff","user":{"login":"tomdee","id":6635,"avatar_url":"https://avatars.githubusercontent.com/u/6635?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdee","html_url":"https://github.com/tomdee","followers_url":"https://api.github.com/users/tomdee/followers","following_url":"https://api.github.com/users/tomdee/following{/other_user}","gists_url":"https://api.github.com/users/tomdee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdee/subscriptions","organizations_url":"https://api.github.com/users/tomdee/orgs","repos_url":"https://api.github.com/users/tomdee/repos","events_url":"https://api.github.com/users/tomdee/events{/privacy}","received_events_url":"https://api.github.com/users/tomdee/received_events","type":"User","site_admin":false},"body":"Is this resolved now?","created_at":"2015-07-17T23:58:56Z","updated_at":"2015-07-17T23:58:56Z","html_url":"https://github.com/Metaswitch/calico-docker/pull/339#discussion_r34940673","pull_request_url":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/339","_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/comments/34940673"},"html":{"href":"https://github.com/Metaswitch/calico-docker/pull/339#discussion_r34940673"},"pull_request":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/339"}}},"pull_request":{"url":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/339","id":40281029,"html_url":"https://github.com/Metaswitch/calico-docker/pull/339","diff_url":"https://github.com/Metaswitch/calico-docker/pull/339.diff","patch_url":"https://github.com/Metaswitch/calico-docker/pull/339.patch","issue_url":"https://api.github.com/repos/Metaswitch/calico-docker/issues/339","number":339,"state":"open","locked":false,"title":"Add UTs for covering libnetwork","user":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"body":"Added more UTs for libnetwork.\r\n\r\nI have currently added pragmas to not count the veth stuff.  I'll sort that out when we move it to netns.\r\n\r\n","created_at":"2015-07-17T23:40:24Z","updated_at":"2015-07-17T23:58:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c1b84f8bcb086ae54047bbf1df74acbb4c4e42f","assignee":{"login":"tomdee","id":6635,"avatar_url":"https://avatars.githubusercontent.com/u/6635?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdee","html_url":"https://github.com/tomdee","followers_url":"https://api.github.com/users/tomdee/followers","following_url":"https://api.github.com/users/tomdee/following{/other_user}","gists_url":"https://api.github.com/users/tomdee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdee/subscriptions","organizations_url":"https://api.github.com/users/tomdee/orgs","repos_url":"https://api.github.com/users/tomdee/repos","events_url":"https://api.github.com/users/tomdee/events{/privacy}","received_events_url":"https://api.github.com/users/tomdee/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/339/commits","review_comments_url":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/339/comments","review_comment_url":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Metaswitch/calico-docker/issues/339/comments","statuses_url":"https://api.github.com/repos/Metaswitch/calico-docker/statuses/3585df232458a2743affb31278955152400058ff","head":{"label":"robbrockbank:add_more_docker_plugin_uts","ref":"add_more_docker_plugin_uts","sha":"3585df232458a2743affb31278955152400058ff","user":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"repo":{"id":38005495,"name":"calico-docker","full_name":"robbrockbank/calico-docker","owner":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robbrockbank/calico-docker","description":"Docker version of Project Calico","fork":true,"url":"https://api.github.com/repos/robbrockbank/calico-docker","forks_url":"https://api.github.com/repos/robbrockbank/calico-docker/forks","keys_url":"https://api.github.com/repos/robbrockbank/calico-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robbrockbank/calico-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robbrockbank/calico-docker/teams","hooks_url":"https://api.github.com/repos/robbrockbank/calico-docker/hooks","issue_events_url":"https://api.github.com/repos/robbrockbank/calico-docker/issues/events{/number}","events_url":"https://api.github.com/repos/robbrockbank/calico-docker/events","assignees_url":"https://api.github.com/repos/robbrockbank/calico-docker/assignees{/user}","branches_url":"https://api.github.com/repos/robbrockbank/calico-docker/branches{/branch}","tags_url":"https://api.github.com/repos/robbrockbank/calico-docker/tags","blobs_url":"https://api.github.com/repos/robbrockbank/calico-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robbrockbank/calico-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robbrockbank/calico-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/robbrockbank/calico-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robbrockbank/calico-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/robbrockbank/calico-docker/languages","stargazers_url":"https://api.github.com/repos/robbrockbank/calico-docker/stargazers","contributors_url":"https://api.github.com/repos/robbrockbank/calico-docker/contributors","subscribers_url":"https://api.github.com/repos/robbrockbank/calico-docker/subscribers","subscription_url":"https://api.github.com/repos/robbrockbank/calico-docker/subscription","commits_url":"https://api.github.com/repos/robbrockbank/calico-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/robbrockbank/calico-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/robbrockbank/calico-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/robbrockbank/calico-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/robbrockbank/calico-docker/contents/{+path}","compare_url":"https://api.github.com/repos/robbrockbank/calico-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robbrockbank/calico-docker/merges","archive_url":"https://api.github.com/repos/robbrockbank/calico-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robbrockbank/calico-docker/downloads","issues_url":"https://api.github.com/repos/robbrockbank/calico-docker/issues{/number}","pulls_url":"https://api.github.com/repos/robbrockbank/calico-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/robbrockbank/calico-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/robbrockbank/calico-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robbrockbank/calico-docker/labels{/name}","releases_url":"https://api.github.com/repos/robbrockbank/calico-docker/releases{/id}","created_at":"2015-06-24T19:10:26Z","updated_at":"2015-06-24T19:10:26Z","pushed_at":"2015-07-17T23:39:18Z","git_url":"git://github.com/robbrockbank/calico-docker.git","ssh_url":"git@github.com:robbrockbank/calico-docker.git","clone_url":"https://github.com/robbrockbank/calico-docker.git","svn_url":"https://github.com/robbrockbank/calico-docker","homepage":"http://www.projectcalico.org","size":13289,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"Metaswitch:master","ref":"master","sha":"0f5ca194474be9c1b43b377b0d832c4f8ee93cb5","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":29629333,"name":"calico-docker","full_name":"Metaswitch/calico-docker","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/calico-docker","description":"Docker version of Project Calico","fork":false,"url":"https://api.github.com/repos/Metaswitch/calico-docker","forks_url":"https://api.github.com/repos/Metaswitch/calico-docker/forks","keys_url":"https://api.github.com/repos/Metaswitch/calico-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/calico-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/calico-docker/teams","hooks_url":"https://api.github.com/repos/Metaswitch/calico-docker/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/calico-docker/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/calico-docker/events","assignees_url":"https://api.github.com/repos/Metaswitch/calico-docker/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/calico-docker/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/calico-docker/tags","blobs_url":"https://api.github.com/repos/Metaswitch/calico-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/calico-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/calico-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/calico-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/calico-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/calico-docker/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/calico-docker/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/calico-docker/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/calico-docker/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/calico-docker/subscription","commits_url":"https://api.github.com/repos/Metaswitch/calico-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/calico-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/calico-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/calico-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/calico-docker/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/calico-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/calico-docker/merges","archive_url":"https://api.github.com/repos/Metaswitch/calico-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/calico-docker/downloads","issues_url":"https://api.github.com/repos/Metaswitch/calico-docker/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/calico-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/calico-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/calico-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/calico-docker/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/calico-docker/releases{/id}","created_at":"2015-01-21T23:46:47Z","updated_at":"2015-07-17T15:00:26Z","pushed_at":"2015-07-17T23:40:24Z","git_url":"git://github.com/Metaswitch/calico-docker.git","ssh_url":"git@github.com:Metaswitch/calico-docker.git","clone_url":"https://github.com/Metaswitch/calico-docker.git","svn_url":"https://github.com/Metaswitch/calico-docker","homepage":"http://www.projectcalico.org","size":16971,"stargazers_count":98,"watchers_count":98,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":18,"forks":17,"open_issues":18,"watchers":98,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/339"},"html":{"href":"https://github.com/Metaswitch/calico-docker/pull/339"},"issue":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/issues/339"},"comments":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/issues/339/comments"},"review_comments":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/339/comments"},"review_comment":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/pulls/339/commits"},"statuses":{"href":"https://api.github.com/repos/Metaswitch/calico-docker/statuses/3585df232458a2743affb31278955152400058ff"}}}}