{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/comments/185255626","pull_request_review_id":116607214,"id":185255626,"diff_hunk":"@@ -251,3 +253,191 @@ def test_should_be_an_error_if_send_email_fails(self, send_email):\n \n         assert res.status_code == 503\n         assert PASSWORD_RESET_EMAIL_ERROR in res.get_data(as_text=True)\n+\n+\n+class TestChangePassword(BaseApplicationTest):\n+\n+    _user = None\n+\n+    def setup_method(self, method):\n+        super().setup_method(method)\n+\n+        data_api_client_config = {'get_user.return_value': self.user(\n+            123, \"email@email.com\", 1234, 'name', 'Name'\n+        )}\n+\n+        self._user = {\n+            \"user\": 123,\n+            \"email\": 'email@email.com',\n+        }\n+\n+        self.data_api_client_patch = mock.patch(\n+            'app.main.views.reset_password.data_api_client', **data_api_client_config\n+        )\n+        self.data_api_client = self.data_api_client_patch.start()\n+\n+    def teardown_method(self, method):\n+        self.data_api_client_patch.stop()\n+        super().teardown_method(method)\n+\n+    @pytest.mark.parametrize(\n+        'user_role, redirect_url',\n+        [('buyer', '/buyers'), ('supplier', '/suppliers'), ('admin', '/admin')]\n+    )\n+    def test_change_password_page_displays_correctly(self, user_role, redirect_url):\n+        if user_role == 'buyer':\n+            self.login_as_buyer()\n+        elif user_role.startswith('admin'):","path":"tests/main/views/test_reset_password.py","position":null,"original_position":52,"commit_id":"12c6c69315e7cb946c547f636c27f6d6a5ba4619","original_commit_id":"f37a32a8b6a556ed63254f5be23b45031354c15d","user":{"login":"katstevens","id":3492540,"avatar_url":"https://avatars3.githubusercontent.com/u/3492540?v=4","gravatar_id":"","url":"https://api.github.com/users/katstevens","html_url":"https://github.com/katstevens","followers_url":"https://api.github.com/users/katstevens/followers","following_url":"https://api.github.com/users/katstevens/following{/other_user}","gists_url":"https://api.github.com/users/katstevens/gists{/gist_id}","starred_url":"https://api.github.com/users/katstevens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katstevens/subscriptions","organizations_url":"https://api.github.com/users/katstevens/orgs","repos_url":"https://api.github.com/users/katstevens/repos","events_url":"https://api.github.com/users/katstevens/events{/privacy}","received_events_url":"https://api.github.com/users/katstevens/received_events","type":"User","site_admin":false},"body":"Nah I think it was just a poor choice of parameter - it should be `admin-ccs-sourcing` or similar, as we no longer use a straight `admin` role. I'll update it to be 💯clear.","created_at":"2018-05-01T15:52:39Z","updated_at":"2018-05-01T15:52:39Z","html_url":"https://github.com/alphagov/digitalmarketplace-user-frontend/pull/58#discussion_r185255626","pull_request_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/58","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/comments/185255626"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-user-frontend/pull/58#discussion_r185255626"},"pull_request":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/58"}},"in_reply_to_id":185239736},"pull_request":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/58","id":184577410,"html_url":"https://github.com/alphagov/digitalmarketplace-user-frontend/pull/58","diff_url":"https://github.com/alphagov/digitalmarketplace-user-frontend/pull/58.diff","patch_url":"https://github.com/alphagov/digitalmarketplace-user-frontend/pull/58.patch","issue_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues/58","number":58,"state":"open","locked":false,"title":"Enable users to change their password when logged in","user":{"login":"CrystalPea","id":20957548,"avatar_url":"https://avatars3.githubusercontent.com/u/20957548?v=4","gravatar_id":"","url":"https://api.github.com/users/CrystalPea","html_url":"https://github.com/CrystalPea","followers_url":"https://api.github.com/users/CrystalPea/followers","following_url":"https://api.github.com/users/CrystalPea/following{/other_user}","gists_url":"https://api.github.com/users/CrystalPea/gists{/gist_id}","starred_url":"https://api.github.com/users/CrystalPea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrystalPea/subscriptions","organizations_url":"https://api.github.com/users/CrystalPea/orgs","repos_url":"https://api.github.com/users/CrystalPea/repos","events_url":"https://api.github.com/users/CrystalPea/events{/privacy}","received_events_url":"https://api.github.com/users/CrystalPea/received_events","type":"User","site_admin":false},"body":"Following our security report recommendation (see ticket for link to report)\r\nThe Trello ticket: https://trello.com/c/TieWrBG5/44-password-reset-link-from-logged-in-session\r\n\r\n![screen shot 2018-04-27 at 10 57 06](https://user-images.githubusercontent.com/20957548/39357291-58c459e6-4a0a-11e8-9682-44b9b03fd30d.png)\r\n","created_at":"2018-04-27T10:01:41Z","updated_at":"2018-05-01T15:52:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7ddd3c264721a33e7fc8e0f60b65dab8f0f99b6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"brenetic","id":3466862,"avatar_url":"https://avatars3.githubusercontent.com/u/3466862?v=4","gravatar_id":"","url":"https://api.github.com/users/brenetic","html_url":"https://github.com/brenetic","followers_url":"https://api.github.com/users/brenetic/followers","following_url":"https://api.github.com/users/brenetic/following{/other_user}","gists_url":"https://api.github.com/users/brenetic/gists{/gist_id}","starred_url":"https://api.github.com/users/brenetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brenetic/subscriptions","organizations_url":"https://api.github.com/users/brenetic/orgs","repos_url":"https://api.github.com/users/brenetic/repos","events_url":"https://api.github.com/users/brenetic/events{/privacy}","received_events_url":"https://api.github.com/users/brenetic/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/58/commits","review_comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/58/comments","review_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues/58/comments","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/statuses/12c6c69315e7cb946c547f636c27f6d6a5ba4619","head":{"label":"alphagov:44-password-reset-link-from-logged-in-session","ref":"44-password-reset-link-from-logged-in-session","sha":"12c6c69315e7cb946c547f636c27f6d6a5ba4619","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":101055712,"name":"digitalmarketplace-user-frontend","full_name":"alphagov/digitalmarketplace-user-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-user-frontend","description":"Digital Marketplace user account pages app","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/deployments","created_at":"2017-08-22T11:29:42Z","updated_at":"2018-04-19T10:11:34Z","pushed_at":"2018-05-01T15:40:34Z","git_url":"git://github.com/alphagov/digitalmarketplace-user-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-user-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-user-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-user-frontend","homepage":null,"size":357,"stargazers_count":0,"watchers_count":0,"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":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"fc17bcee5309cf1bf8b9a0e55207e5f12a61b8e7","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":101055712,"name":"digitalmarketplace-user-frontend","full_name":"alphagov/digitalmarketplace-user-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-user-frontend","description":"Digital Marketplace user account pages app","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/deployments","created_at":"2017-08-22T11:29:42Z","updated_at":"2018-04-19T10:11:34Z","pushed_at":"2018-05-01T15:40:34Z","git_url":"git://github.com/alphagov/digitalmarketplace-user-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-user-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-user-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-user-frontend","homepage":null,"size":357,"stargazers_count":0,"watchers_count":0,"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":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/58"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-user-frontend/pull/58"},"issue":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues/58"},"comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-user-frontend/statuses/12c6c69315e7cb946c547f636c27f6d6a5ba4619"}},"author_association":"NONE"}}
{"actor":{"display_login":"katstevens"}}