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

Method test_get_by_id

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

Source from the content-addressed store, hash-verified

38
39 # Ensure id is correct for the current/logged in user
40 def test_get_by_id(self):
41 with self.client:
42 self.client.post('/login', data=dict(
43 username="admin", password='admin'
44 ), follow_redirects=True)
45 self.assertTrue(current_user.id == 1)
46 self.assertFalse(current_user.id == 20)
47
48 # Ensure given password is correct after unhashing
49 def test_check_password(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected