{"action":"created","comment":{"url":"https://api.github.com/repos/yola/sitewit/pulls/comments/36112892","id":36112892,"diff_hunk":"@@ -52,11 +52,32 @@ def test_existing_account_is_returned(self):\n                          self.account2['accountInfo']['accountNumber'])\n \n \n+class TestAccountCreationWithUserTokenPassed(AccountTestCase):\n+    def setUp(self):\n+        service = SitewitService()\n+        site_id = uuid.uuid4()\n+\n+        response = service.create_account(\n+            site_id, self.url, self.user_name, self.user_email,\n+            self.currency, self.country_code)\n+\n+        self.user_token = response['userInfo']['token']\n+\n+        self.response = service.create_account(\n+            uuid.uuid4(), 'https://foo.bar', self.user_name,\n+            '{}@yola.com'.format(uuid.uuid4()),\n+            self.currency, self.country_code, self.user_token)\n+\n+    def test_creates_new_account_for_the_given_user(self):\n+        self.assertIsNotNone(self.user_token)\n+        self.assertEqual(self.user_token, self.response['userInfo']['token'])","path":"tests/accounts/test_integration.py","position":22,"original_position":22,"commit_id":"2646d9108eb5a276c833d27133d6f83627c34df0","original_commit_id":"2646d9108eb5a276c833d27133d6f83627c34df0","user":{"login":"RayeN","id":712948,"avatar_url":"https://avatars.githubusercontent.com/u/712948?v=3","gravatar_id":"","url":"https://api.github.com/users/RayeN","html_url":"https://github.com/RayeN","followers_url":"https://api.github.com/users/RayeN/followers","following_url":"https://api.github.com/users/RayeN/following{/other_user}","gists_url":"https://api.github.com/users/RayeN/gists{/gist_id}","starred_url":"https://api.github.com/users/RayeN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RayeN/subscriptions","organizations_url":"https://api.github.com/users/RayeN/orgs","repos_url":"https://api.github.com/users/RayeN/repos","events_url":"https://api.github.com/users/RayeN/events{/privacy}","received_events_url":"https://api.github.com/users/RayeN/received_events","type":"User","site_admin":false},"body":"On SiteWit side, they have both.  User might have multiple accounts (and from what I saw - the same account might be attached to multiple users).  Account (SiteWit) corresponds to our Site, and User (SiteWit) to our User.","created_at":"2015-08-03T18:09:26Z","updated_at":"2015-08-03T18:09:26Z","html_url":"https://github.com/yola/sitewit/pull/20#discussion_r36112892","pull_request_url":"https://api.github.com/repos/yola/sitewit/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/yola/sitewit/pulls/comments/36112892"},"html":{"href":"https://github.com/yola/sitewit/pull/20#discussion_r36112892"},"pull_request":{"href":"https://api.github.com/repos/yola/sitewit/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/yola/sitewit/pulls/20","id":41489215,"html_url":"https://github.com/yola/sitewit/pull/20","diff_url":"https://github.com/yola/sitewit/pull/20.diff","patch_url":"https://github.com/yola/sitewit/pull/20.patch","issue_url":"https://api.github.com/repos/yola/sitewit/issues/20","number":20,"state":"open","locked":false,"title":"Add test to check if user_token is returned for 2nd account creation for the same user.","user":{"login":"RayeN","id":712948,"avatar_url":"https://avatars.githubusercontent.com/u/712948?v=3","gravatar_id":"","url":"https://api.github.com/users/RayeN","html_url":"https://github.com/RayeN","followers_url":"https://api.github.com/users/RayeN/followers","following_url":"https://api.github.com/users/RayeN/following{/other_user}","gists_url":"https://api.github.com/users/RayeN/gists{/gist_id}","starred_url":"https://api.github.com/users/RayeN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RayeN/subscriptions","organizations_url":"https://api.github.com/users/RayeN/orgs","repos_url":"https://api.github.com/users/RayeN/repos","events_url":"https://api.github.com/users/RayeN/events{/privacy}","received_events_url":"https://api.github.com/users/RayeN/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-03T17:18:03Z","updated_at":"2015-08-03T18:09:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f28bb91876454c438df1ec0272abe6bff9126e8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yola/sitewit/pulls/20/commits","review_comments_url":"https://api.github.com/repos/yola/sitewit/pulls/20/comments","review_comment_url":"https://api.github.com/repos/yola/sitewit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yola/sitewit/issues/20/comments","statuses_url":"https://api.github.com/repos/yola/sitewit/statuses/2646d9108eb5a276c833d27133d6f83627c34df0","head":{"label":"yola:test-user-token-is-returned","ref":"test-user-token-is-returned","sha":"2646d9108eb5a276c833d27133d6f83627c34df0","user":{"login":"yola","id":861497,"avatar_url":"https://avatars.githubusercontent.com/u/861497?v=3","gravatar_id":"","url":"https://api.github.com/users/yola","html_url":"https://github.com/yola","followers_url":"https://api.github.com/users/yola/followers","following_url":"https://api.github.com/users/yola/following{/other_user}","gists_url":"https://api.github.com/users/yola/gists{/gist_id}","starred_url":"https://api.github.com/users/yola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yola/subscriptions","organizations_url":"https://api.github.com/users/yola/orgs","repos_url":"https://api.github.com/users/yola/repos","events_url":"https://api.github.com/users/yola/events{/privacy}","received_events_url":"https://api.github.com/users/yola/received_events","type":"Organization","site_admin":false},"repo":{"id":15058701,"name":"sitewit","full_name":"yola/sitewit","owner":{"login":"yola","id":861497,"avatar_url":"https://avatars.githubusercontent.com/u/861497?v=3","gravatar_id":"","url":"https://api.github.com/users/yola","html_url":"https://github.com/yola","followers_url":"https://api.github.com/users/yola/followers","following_url":"https://api.github.com/users/yola/following{/other_user}","gists_url":"https://api.github.com/users/yola/gists{/gist_id}","starred_url":"https://api.github.com/users/yola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yola/subscriptions","organizations_url":"https://api.github.com/users/yola/orgs","repos_url":"https://api.github.com/users/yola/repos","events_url":"https://api.github.com/users/yola/events{/privacy}","received_events_url":"https://api.github.com/users/yola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yola/sitewit","description":"SiteWit Python client","fork":false,"url":"https://api.github.com/repos/yola/sitewit","forks_url":"https://api.github.com/repos/yola/sitewit/forks","keys_url":"https://api.github.com/repos/yola/sitewit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yola/sitewit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yola/sitewit/teams","hooks_url":"https://api.github.com/repos/yola/sitewit/hooks","issue_events_url":"https://api.github.com/repos/yola/sitewit/issues/events{/number}","events_url":"https://api.github.com/repos/yola/sitewit/events","assignees_url":"https://api.github.com/repos/yola/sitewit/assignees{/user}","branches_url":"https://api.github.com/repos/yola/sitewit/branches{/branch}","tags_url":"https://api.github.com/repos/yola/sitewit/tags","blobs_url":"https://api.github.com/repos/yola/sitewit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yola/sitewit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yola/sitewit/git/refs{/sha}","trees_url":"https://api.github.com/repos/yola/sitewit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yola/sitewit/statuses/{sha}","languages_url":"https://api.github.com/repos/yola/sitewit/languages","stargazers_url":"https://api.github.com/repos/yola/sitewit/stargazers","contributors_url":"https://api.github.com/repos/yola/sitewit/contributors","subscribers_url":"https://api.github.com/repos/yola/sitewit/subscribers","subscription_url":"https://api.github.com/repos/yola/sitewit/subscription","commits_url":"https://api.github.com/repos/yola/sitewit/commits{/sha}","git_commits_url":"https://api.github.com/repos/yola/sitewit/git/commits{/sha}","comments_url":"https://api.github.com/repos/yola/sitewit/comments{/number}","issue_comment_url":"https://api.github.com/repos/yola/sitewit/issues/comments{/number}","contents_url":"https://api.github.com/repos/yola/sitewit/contents/{+path}","compare_url":"https://api.github.com/repos/yola/sitewit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yola/sitewit/merges","archive_url":"https://api.github.com/repos/yola/sitewit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yola/sitewit/downloads","issues_url":"https://api.github.com/repos/yola/sitewit/issues{/number}","pulls_url":"https://api.github.com/repos/yola/sitewit/pulls{/number}","milestones_url":"https://api.github.com/repos/yola/sitewit/milestones{/number}","notifications_url":"https://api.github.com/repos/yola/sitewit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yola/sitewit/labels{/name}","releases_url":"https://api.github.com/repos/yola/sitewit/releases{/id}","created_at":"2013-12-09T20:50:03Z","updated_at":"2015-04-23T15:02:52Z","pushed_at":"2015-08-03T17:49:31Z","git_url":"git://github.com/yola/sitewit.git","ssh_url":"git@github.com:yola/sitewit.git","clone_url":"https://github.com/yola/sitewit.git","svn_url":"https://github.com/yola/sitewit","homepage":null,"size":468,"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":"master"}},"base":{"label":"yola:master","ref":"master","sha":"3a9b0f4107cb012e5208632515f9f00b4442c0a5","user":{"login":"yola","id":861497,"avatar_url":"https://avatars.githubusercontent.com/u/861497?v=3","gravatar_id":"","url":"https://api.github.com/users/yola","html_url":"https://github.com/yola","followers_url":"https://api.github.com/users/yola/followers","following_url":"https://api.github.com/users/yola/following{/other_user}","gists_url":"https://api.github.com/users/yola/gists{/gist_id}","starred_url":"https://api.github.com/users/yola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yola/subscriptions","organizations_url":"https://api.github.com/users/yola/orgs","repos_url":"https://api.github.com/users/yola/repos","events_url":"https://api.github.com/users/yola/events{/privacy}","received_events_url":"https://api.github.com/users/yola/received_events","type":"Organization","site_admin":false},"repo":{"id":15058701,"name":"sitewit","full_name":"yola/sitewit","owner":{"login":"yola","id":861497,"avatar_url":"https://avatars.githubusercontent.com/u/861497?v=3","gravatar_id":"","url":"https://api.github.com/users/yola","html_url":"https://github.com/yola","followers_url":"https://api.github.com/users/yola/followers","following_url":"https://api.github.com/users/yola/following{/other_user}","gists_url":"https://api.github.com/users/yola/gists{/gist_id}","starred_url":"https://api.github.com/users/yola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yola/subscriptions","organizations_url":"https://api.github.com/users/yola/orgs","repos_url":"https://api.github.com/users/yola/repos","events_url":"https://api.github.com/users/yola/events{/privacy}","received_events_url":"https://api.github.com/users/yola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yola/sitewit","description":"SiteWit Python client","fork":false,"url":"https://api.github.com/repos/yola/sitewit","forks_url":"https://api.github.com/repos/yola/sitewit/forks","keys_url":"https://api.github.com/repos/yola/sitewit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yola/sitewit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yola/sitewit/teams","hooks_url":"https://api.github.com/repos/yola/sitewit/hooks","issue_events_url":"https://api.github.com/repos/yola/sitewit/issues/events{/number}","events_url":"https://api.github.com/repos/yola/sitewit/events","assignees_url":"https://api.github.com/repos/yola/sitewit/assignees{/user}","branches_url":"https://api.github.com/repos/yola/sitewit/branches{/branch}","tags_url":"https://api.github.com/repos/yola/sitewit/tags","blobs_url":"https://api.github.com/repos/yola/sitewit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yola/sitewit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yola/sitewit/git/refs{/sha}","trees_url":"https://api.github.com/repos/yola/sitewit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yola/sitewit/statuses/{sha}","languages_url":"https://api.github.com/repos/yola/sitewit/languages","stargazers_url":"https://api.github.com/repos/yola/sitewit/stargazers","contributors_url":"https://api.github.com/repos/yola/sitewit/contributors","subscribers_url":"https://api.github.com/repos/yola/sitewit/subscribers","subscription_url":"https://api.github.com/repos/yola/sitewit/subscription","commits_url":"https://api.github.com/repos/yola/sitewit/commits{/sha}","git_commits_url":"https://api.github.com/repos/yola/sitewit/git/commits{/sha}","comments_url":"https://api.github.com/repos/yola/sitewit/comments{/number}","issue_comment_url":"https://api.github.com/repos/yola/sitewit/issues/comments{/number}","contents_url":"https://api.github.com/repos/yola/sitewit/contents/{+path}","compare_url":"https://api.github.com/repos/yola/sitewit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yola/sitewit/merges","archive_url":"https://api.github.com/repos/yola/sitewit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yola/sitewit/downloads","issues_url":"https://api.github.com/repos/yola/sitewit/issues{/number}","pulls_url":"https://api.github.com/repos/yola/sitewit/pulls{/number}","milestones_url":"https://api.github.com/repos/yola/sitewit/milestones{/number}","notifications_url":"https://api.github.com/repos/yola/sitewit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yola/sitewit/labels{/name}","releases_url":"https://api.github.com/repos/yola/sitewit/releases{/id}","created_at":"2013-12-09T20:50:03Z","updated_at":"2015-04-23T15:02:52Z","pushed_at":"2015-08-03T17:49:31Z","git_url":"git://github.com/yola/sitewit.git","ssh_url":"git@github.com:yola/sitewit.git","clone_url":"https://github.com/yola/sitewit.git","svn_url":"https://github.com/yola/sitewit","homepage":null,"size":468,"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":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yola/sitewit/pulls/20"},"html":{"href":"https://github.com/yola/sitewit/pull/20"},"issue":{"href":"https://api.github.com/repos/yola/sitewit/issues/20"},"comments":{"href":"https://api.github.com/repos/yola/sitewit/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/yola/sitewit/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/yola/sitewit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yola/sitewit/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/yola/sitewit/statuses/2646d9108eb5a276c833d27133d6f83627c34df0"}}}}