MCPcopy Create free account
hub / github.com/realpython/discover-flask / test_incorrect_login

Method test_incorrect_login

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

Source from the content-addressed store, hash-verified

73
74 # Ensure login behaves correctly with incorrect credentials
75 def test_incorrect_login(self):
76 response = self.client.post(
77 '/login',
78 data=dict(username="wrong", password="wrong"),
79 follow_redirects=True
80 )
81 self.assertIn(b'Invalid username or password.', response.data)
82
83 # Ensure logout behaves correctly
84 def test_logout(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected