Updated from git comments. Return status code 400 for duplicate

email address.
This commit is contained in:
Adam Shimali
2016-03-09 15:46:45 +00:00
parent 33c92a4e29
commit 0095e4b608
2 changed files with 2 additions and 1 deletions

View File

@@ -122,7 +122,7 @@ def test_register_with_existing_email_returns_error(app_,
with app_.test_request_context():
response = app_.test_client().post(url_for('main.register'),
data=user_data)
assert response.status_code == 200
assert response.status_code == 400
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
element = page.find('h1')
assert element.text == 'Create an account'