{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/notifications-api/pulls/comments/142614360","pull_request_review_id":66997057,"id":142614360,"diff_hunk":"@@ -322,3 +324,26 @@ def test_allows_api_calls_with_international_numbers_if_service_does_allow_int_s\n     service = create_service(notify_db, notify_db_session, permissions=[SMS_TYPE, INTERNATIONAL_SMS_TYPE])\n     result = validate_and_format_recipient('20-12-1234-1234', key_type, service, SMS_TYPE)\n     assert result == '201212341234'\n+\n+\n+def test_check_service_email_reply_to_id_where_reply_to_id_is_none():\n+    assert check_service_email_reply_to_id(None, None) is None\n+\n+\n+def test_check_service_email_reply_to_id_where_reply_to_id_is_not_found(sample_service, fake_uuid):\n+    with pytest.raises(BadRequestError) as e:\n+        check_service_email_reply_to_id(sample_service.id, fake_uuid)\n+    assert e.value.status_code == 400\n+    assert e.value.message == 'reply_to_id does not exist in database'","path":"tests/app/notifications/test_validators.py","position":32,"original_position":32,"commit_id":"01f2a822e22d3b55322b7abb5c0aa40e288e6261","original_commit_id":"01f2a822e22d3b55322b7abb5c0aa40e288e6261","user":{"login":"servingUpAces","id":4282990,"avatar_url":"https://avatars2.githubusercontent.com/u/4282990?v=4","gravatar_id":"","url":"https://api.github.com/users/servingUpAces","html_url":"https://github.com/servingUpAces","followers_url":"https://api.github.com/users/servingUpAces/followers","following_url":"https://api.github.com/users/servingUpAces/following{/other_user}","gists_url":"https://api.github.com/users/servingUpAces/gists{/gist_id}","starred_url":"https://api.github.com/users/servingUpAces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servingUpAces/subscriptions","organizations_url":"https://api.github.com/users/servingUpAces/orgs","repos_url":"https://api.github.com/users/servingUpAces/repos","events_url":"https://api.github.com/users/servingUpAces/events{/privacy}","received_events_url":"https://api.github.com/users/servingUpAces/received_events","type":"User","site_admin":false},"body":"The error message should match the name of the form parameter, email_reply_to_id","created_at":"2017-10-04T08:52:42Z","updated_at":"2017-10-04T08:55:29Z","html_url":"https://github.com/alphagov/notifications-api/pull/1291#discussion_r142614360","pull_request_url":"https://api.github.com/repos/alphagov/notifications-api/pulls/1291","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/comments/142614360"},"html":{"href":"https://github.com/alphagov/notifications-api/pull/1291#discussion_r142614360"},"pull_request":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/1291"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/notifications-api/pulls/1291","id":144466774,"html_url":"https://github.com/alphagov/notifications-api/pull/1291","diff_url":"https://github.com/alphagov/notifications-api/pull/1291.diff","patch_url":"https://github.com/alphagov/notifications-api/pull/1291.patch","issue_url":"https://api.github.com/repos/alphagov/notifications-api/issues/1291","number":1291,"state":"open","locked":false,"title":"[2/10] Allow API calls to specify the reply address option","user":{"login":"richardc0","id":31849076,"avatar_url":"https://avatars3.githubusercontent.com/u/31849076?v=4","gravatar_id":"","url":"https://api.github.com/users/richardc0","html_url":"https://github.com/richardc0","followers_url":"https://api.github.com/users/richardc0/followers","following_url":"https://api.github.com/users/richardc0/following{/other_user}","gists_url":"https://api.github.com/users/richardc0/gists{/gist_id}","starred_url":"https://api.github.com/users/richardc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardc0/subscriptions","organizations_url":"https://api.github.com/users/richardc0/orgs","repos_url":"https://api.github.com/users/richardc0/repos","events_url":"https://api.github.com/users/richardc0/events{/privacy}","received_events_url":"https://api.github.com/users/richardc0/received_events","type":"User","site_admin":false},"body":"- Updated notification schema to include email_reply_to_id so that it can be persisted\r\n- Updated the end point in the post_notification to consume the new value in the schema and added a new validator to check the new email_reply_to_id is valid\r\n- Added tests to test the new functionality added to the schema, code in the end point and unit tests for the validator","created_at":"2017-10-03T16:19:30Z","updated_at":"2017-10-04T08:55:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d54c38355d8c91c302c499612487caa9b69560b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/notifications-api/pulls/1291/commits","review_comments_url":"https://api.github.com/repos/alphagov/notifications-api/pulls/1291/comments","review_comment_url":"https://api.github.com/repos/alphagov/notifications-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/notifications-api/issues/1291/comments","statuses_url":"https://api.github.com/repos/alphagov/notifications-api/statuses/01f2a822e22d3b55322b7abb5c0aa40e288e6261","head":{"label":"alphagov:rc_add_email_reply_to-post_noti","ref":"rc_add_email_reply_to-post_noti","sha":"01f2a822e22d3b55322b7abb5c0aa40e288e6261","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":46422101,"name":"notifications-api","full_name":"alphagov/notifications-api","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/notifications-api","description":"Notifications api","fork":false,"url":"https://api.github.com/repos/alphagov/notifications-api","forks_url":"https://api.github.com/repos/alphagov/notifications-api/forks","keys_url":"https://api.github.com/repos/alphagov/notifications-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/notifications-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/notifications-api/teams","hooks_url":"https://api.github.com/repos/alphagov/notifications-api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/notifications-api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/notifications-api/events","assignees_url":"https://api.github.com/repos/alphagov/notifications-api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/notifications-api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/notifications-api/tags","blobs_url":"https://api.github.com/repos/alphagov/notifications-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/notifications-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/notifications-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/notifications-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/notifications-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/notifications-api/languages","stargazers_url":"https://api.github.com/repos/alphagov/notifications-api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/notifications-api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/notifications-api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/notifications-api/subscription","commits_url":"https://api.github.com/repos/alphagov/notifications-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/notifications-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/notifications-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/notifications-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/notifications-api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/notifications-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/notifications-api/merges","archive_url":"https://api.github.com/repos/alphagov/notifications-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/notifications-api/downloads","issues_url":"https://api.github.com/repos/alphagov/notifications-api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/notifications-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/notifications-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/notifications-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/notifications-api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/notifications-api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/notifications-api/deployments","created_at":"2015-11-18T13:57:17Z","updated_at":"2017-05-24T16:00:23Z","pushed_at":"2017-10-04T08:41:22Z","git_url":"git://github.com/alphagov/notifications-api.git","ssh_url":"git@github.com:alphagov/notifications-api.git","clone_url":"https://github.com/alphagov/notifications-api.git","svn_url":"https://github.com/alphagov/notifications-api","homepage":null,"size":14441,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":8,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"0903a28ba8000ed222564cd0960d18f5bdfa3252","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":46422101,"name":"notifications-api","full_name":"alphagov/notifications-api","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/notifications-api","description":"Notifications api","fork":false,"url":"https://api.github.com/repos/alphagov/notifications-api","forks_url":"https://api.github.com/repos/alphagov/notifications-api/forks","keys_url":"https://api.github.com/repos/alphagov/notifications-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/notifications-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/notifications-api/teams","hooks_url":"https://api.github.com/repos/alphagov/notifications-api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/notifications-api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/notifications-api/events","assignees_url":"https://api.github.com/repos/alphagov/notifications-api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/notifications-api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/notifications-api/tags","blobs_url":"https://api.github.com/repos/alphagov/notifications-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/notifications-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/notifications-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/notifications-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/notifications-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/notifications-api/languages","stargazers_url":"https://api.github.com/repos/alphagov/notifications-api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/notifications-api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/notifications-api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/notifications-api/subscription","commits_url":"https://api.github.com/repos/alphagov/notifications-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/notifications-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/notifications-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/notifications-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/notifications-api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/notifications-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/notifications-api/merges","archive_url":"https://api.github.com/repos/alphagov/notifications-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/notifications-api/downloads","issues_url":"https://api.github.com/repos/alphagov/notifications-api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/notifications-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/notifications-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/notifications-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/notifications-api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/notifications-api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/notifications-api/deployments","created_at":"2015-11-18T13:57:17Z","updated_at":"2017-05-24T16:00:23Z","pushed_at":"2017-10-04T08:41:22Z","git_url":"git://github.com/alphagov/notifications-api.git","ssh_url":"git@github.com:alphagov/notifications-api.git","clone_url":"https://github.com/alphagov/notifications-api.git","svn_url":"https://github.com/alphagov/notifications-api","homepage":null,"size":14441,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/1291"},"html":{"href":"https://github.com/alphagov/notifications-api/pull/1291"},"issue":{"href":"https://api.github.com/repos/alphagov/notifications-api/issues/1291"},"comments":{"href":"https://api.github.com/repos/alphagov/notifications-api/issues/1291/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/1291/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/1291/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/notifications-api/statuses/01f2a822e22d3b55322b7abb5c0aa40e288e6261"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"servingUpAces"}}