MCPcopy Index your code
hub / github.com/realpython/discover-flask / test_incorrect_user_registeration

Method test_incorrect_user_registeration

tests/test_users.py:30–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28
29 # Ensure errors are thrown during an incorrect user registration
30 def test_incorrect_user_registeration(self):
31 with self.client:
32 response = self.client.post('register/', data=dict(
33 username='Michael', email='michael',
34 password='python', confirm='python'
35 ), follow_redirects=True)
36 self.assertIn(b'Invalid email address.', response.data)
37 self.assertIn(b'/register/', request.url)
38
39 # Ensure id is correct for the current/logged in user
40 def test_get_by_id(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected