1 def test_register_user_mismatched_passwords(self):
2 response = self.client.post('/auth/register', data={
3 'username': 'alice',
4 'email': 'alice@example.com',
5 'password': 'foo',
6 'password2': 'bar',
7 })
8 assert response.status_code == 200
9 html = response.get_data(as_text=True)
10 assert 'Field must be equal to password.' in html