{"action":"created","comment":{"url":"https://api.github.com/repos/praekelt/ndoh-control/pulls/comments/40009210","id":40009210,"diff_hunk":"@@ -459,6 +589,112 @@ def test_jembi_post_json(self):\n                       body='jembi_post_json task', status=201,\n                       content_type='application/json')\n \n-        task_response = jembi_post_json.apply_async(\n+        task_response = tasks.jembi_post_json.apply_async(\n             kwargs={\"registration_id\": registration.data[\"id\"]})\n         self.assertEqual(task_response.get(), 'jembi_post_json task')\n+\n+\n+class TestUpdateCreateVumiContactTask(AuthenticatedAPITestCase):\n+\n+    def test_update_vumi_contact(self):\n+        registration = self.make_registration(\n+            post_data=TEST_REG_DATA[\"clinic_self\"])\n+        client = self.make_client()\n+        self.make_existing_contact({\n+            u\"key\": u\"knownuuid\",\n+            u\"msisdn\": u\"+27001\",\n+            u\"user_account\": u\"knownaccount\",\n+            u\"extra\": {}\n+        })\n+\n+        contact = tasks.update_create_vumi_contact.apply_async(\n+            kwargs={\"registration_id\": registration.data[\"id\"],\n+                    \"client\": client})\n+        self.assertEqual(contact.get()[\"msisdn\"], \"+27001\")","path":"registration/tests.py","position":293,"original_position":293,"commit_id":"b74a0404c5dd10001673d11fc9bf8cac167cf6fc","original_commit_id":"b74a0404c5dd10001673d11fc9bf8cac167cf6fc","user":{"login":"imsickofmaps","id":1228977,"avatar_url":"https://avatars.githubusercontent.com/u/1228977?v=3","gravatar_id":"","url":"https://api.github.com/users/imsickofmaps","html_url":"https://github.com/imsickofmaps","followers_url":"https://api.github.com/users/imsickofmaps/followers","following_url":"https://api.github.com/users/imsickofmaps/following{/other_user}","gists_url":"https://api.github.com/users/imsickofmaps/gists{/gist_id}","starred_url":"https://api.github.com/users/imsickofmaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imsickofmaps/subscriptions","organizations_url":"https://api.github.com/users/imsickofmaps/orgs","repos_url":"https://api.github.com/users/imsickofmaps/repos","events_url":"https://api.github.com/users/imsickofmaps/events{/privacy}","received_events_url":"https://api.github.com/users/imsickofmaps/received_events","type":"User","site_admin":false},"body":"This works of course, but you could simplify this for yourself but doing `result = contact.get()` and then just using `result[\"key\"], \"expected\"` throughout.  ","created_at":"2015-09-21T18:44:58Z","updated_at":"2015-09-21T18:44:58Z","html_url":"https://github.com/praekelt/ndoh-control/pull/89#discussion_r40009210","pull_request_url":"https://api.github.com/repos/praekelt/ndoh-control/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/praekelt/ndoh-control/pulls/comments/40009210"},"html":{"href":"https://github.com/praekelt/ndoh-control/pull/89#discussion_r40009210"},"pull_request":{"href":"https://api.github.com/repos/praekelt/ndoh-control/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/praekelt/ndoh-control/pulls/89","id":45335697,"html_url":"https://github.com/praekelt/ndoh-control/pull/89","diff_url":"https://github.com/praekelt/ndoh-control/pull/89.diff","patch_url":"https://github.com/praekelt/ndoh-control/pull/89.patch","issue_url":"https://api.github.com/repos/praekelt/ndoh-control/issues/89","number":89,"state":"open","locked":false,"title":"Create or update registration contact on Vumi","user":{"login":"gsvr","id":3907663,"avatar_url":"https://avatars.githubusercontent.com/u/3907663?v=3","gravatar_id":"","url":"https://api.github.com/users/gsvr","html_url":"https://github.com/gsvr","followers_url":"https://api.github.com/users/gsvr/followers","following_url":"https://api.github.com/users/gsvr/following{/other_user}","gists_url":"https://api.github.com/users/gsvr/gists{/gist_id}","starred_url":"https://api.github.com/users/gsvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsvr/subscriptions","organizations_url":"https://api.github.com/users/gsvr/orgs","repos_url":"https://api.github.com/users/gsvr/repos","events_url":"https://api.github.com/users/gsvr/events{/privacy}","received_events_url":"https://api.github.com/users/gsvr/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-17T20:09:28Z","updated_at":"2015-09-21T18:44:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f408d99916422c2c4957ad007536ce4e4ab1866f","assignee":{"login":"gsvr","id":3907663,"avatar_url":"https://avatars.githubusercontent.com/u/3907663?v=3","gravatar_id":"","url":"https://api.github.com/users/gsvr","html_url":"https://github.com/gsvr","followers_url":"https://api.github.com/users/gsvr/followers","following_url":"https://api.github.com/users/gsvr/following{/other_user}","gists_url":"https://api.github.com/users/gsvr/gists{/gist_id}","starred_url":"https://api.github.com/users/gsvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsvr/subscriptions","organizations_url":"https://api.github.com/users/gsvr/orgs","repos_url":"https://api.github.com/users/gsvr/repos","events_url":"https://api.github.com/users/gsvr/events{/privacy}","received_events_url":"https://api.github.com/users/gsvr/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/praekelt/ndoh-control/pulls/89/commits","review_comments_url":"https://api.github.com/repos/praekelt/ndoh-control/pulls/89/comments","review_comment_url":"https://api.github.com/repos/praekelt/ndoh-control/pulls/comments{/number}","comments_url":"https://api.github.com/repos/praekelt/ndoh-control/issues/89/comments","statuses_url":"https://api.github.com/repos/praekelt/ndoh-control/statuses/b74a0404c5dd10001673d11fc9bf8cac167cf6fc","head":{"label":"praekelt:feature/issue-89-create-or-update-registration-contact-on-vumi","ref":"feature/issue-89-create-or-update-registration-contact-on-vumi","sha":"b74a0404c5dd10001673d11fc9bf8cac167cf6fc","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":21165314,"name":"ndoh-control","full_name":"praekelt/ndoh-control","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/ndoh-control","description":"","fork":false,"url":"https://api.github.com/repos/praekelt/ndoh-control","forks_url":"https://api.github.com/repos/praekelt/ndoh-control/forks","keys_url":"https://api.github.com/repos/praekelt/ndoh-control/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/ndoh-control/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/ndoh-control/teams","hooks_url":"https://api.github.com/repos/praekelt/ndoh-control/hooks","issue_events_url":"https://api.github.com/repos/praekelt/ndoh-control/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/ndoh-control/events","assignees_url":"https://api.github.com/repos/praekelt/ndoh-control/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/ndoh-control/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/ndoh-control/tags","blobs_url":"https://api.github.com/repos/praekelt/ndoh-control/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/ndoh-control/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/ndoh-control/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/ndoh-control/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/ndoh-control/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/ndoh-control/languages","stargazers_url":"https://api.github.com/repos/praekelt/ndoh-control/stargazers","contributors_url":"https://api.github.com/repos/praekelt/ndoh-control/contributors","subscribers_url":"https://api.github.com/repos/praekelt/ndoh-control/subscribers","subscription_url":"https://api.github.com/repos/praekelt/ndoh-control/subscription","commits_url":"https://api.github.com/repos/praekelt/ndoh-control/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/ndoh-control/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/ndoh-control/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/ndoh-control/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/ndoh-control/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/ndoh-control/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/ndoh-control/merges","archive_url":"https://api.github.com/repos/praekelt/ndoh-control/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/ndoh-control/downloads","issues_url":"https://api.github.com/repos/praekelt/ndoh-control/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/ndoh-control/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/ndoh-control/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/ndoh-control/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/ndoh-control/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/ndoh-control/releases{/id}","created_at":"2014-06-24T13:23:02Z","updated_at":"2015-04-22T12:38:57Z","pushed_at":"2015-09-21T10:27:01Z","git_url":"git://github.com/praekelt/ndoh-control.git","ssh_url":"git@github.com:praekelt/ndoh-control.git","clone_url":"https://github.com/praekelt/ndoh-control.git","svn_url":"https://github.com/praekelt/ndoh-control","homepage":null,"size":3200,"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":20,"forks":0,"open_issues":20,"watchers":0,"default_branch":"develop"}},"base":{"label":"praekelt:develop","ref":"develop","sha":"ce6fdc01f00f9080ba03c3fe6c352727945d4b8d","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":21165314,"name":"ndoh-control","full_name":"praekelt/ndoh-control","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/ndoh-control","description":"","fork":false,"url":"https://api.github.com/repos/praekelt/ndoh-control","forks_url":"https://api.github.com/repos/praekelt/ndoh-control/forks","keys_url":"https://api.github.com/repos/praekelt/ndoh-control/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/ndoh-control/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/ndoh-control/teams","hooks_url":"https://api.github.com/repos/praekelt/ndoh-control/hooks","issue_events_url":"https://api.github.com/repos/praekelt/ndoh-control/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/ndoh-control/events","assignees_url":"https://api.github.com/repos/praekelt/ndoh-control/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/ndoh-control/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/ndoh-control/tags","blobs_url":"https://api.github.com/repos/praekelt/ndoh-control/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/ndoh-control/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/ndoh-control/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/ndoh-control/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/ndoh-control/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/ndoh-control/languages","stargazers_url":"https://api.github.com/repos/praekelt/ndoh-control/stargazers","contributors_url":"https://api.github.com/repos/praekelt/ndoh-control/contributors","subscribers_url":"https://api.github.com/repos/praekelt/ndoh-control/subscribers","subscription_url":"https://api.github.com/repos/praekelt/ndoh-control/subscription","commits_url":"https://api.github.com/repos/praekelt/ndoh-control/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/ndoh-control/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/ndoh-control/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/ndoh-control/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/ndoh-control/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/ndoh-control/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/ndoh-control/merges","archive_url":"https://api.github.com/repos/praekelt/ndoh-control/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/ndoh-control/downloads","issues_url":"https://api.github.com/repos/praekelt/ndoh-control/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/ndoh-control/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/ndoh-control/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/ndoh-control/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/ndoh-control/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/ndoh-control/releases{/id}","created_at":"2014-06-24T13:23:02Z","updated_at":"2015-04-22T12:38:57Z","pushed_at":"2015-09-21T10:27:01Z","git_url":"git://github.com/praekelt/ndoh-control.git","ssh_url":"git@github.com:praekelt/ndoh-control.git","clone_url":"https://github.com/praekelt/ndoh-control.git","svn_url":"https://github.com/praekelt/ndoh-control","homepage":null,"size":3200,"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":20,"forks":0,"open_issues":20,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/praekelt/ndoh-control/pulls/89"},"html":{"href":"https://github.com/praekelt/ndoh-control/pull/89"},"issue":{"href":"https://api.github.com/repos/praekelt/ndoh-control/issues/89"},"comments":{"href":"https://api.github.com/repos/praekelt/ndoh-control/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/praekelt/ndoh-control/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/praekelt/ndoh-control/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/praekelt/ndoh-control/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/praekelt/ndoh-control/statuses/b74a0404c5dd10001673d11fc9bf8cac167cf6fc"}}}}