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

Method test_logout

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

Source from the content-addressed store, hash-verified

82
83 # Ensure logout behaves correctly
84 def test_logout(self):
85 with self.client:
86 self.client.post(
87 '/login',
88 data=dict(username="admin", password="admin"),
89 follow_redirects=True
90 )
91 response = self.client.get('/logout', follow_redirects=True)
92 self.assertIn(b'You were logged out', response.data)
93 self.assertFalse(current_user.is_active())
94
95 # Ensure that logout page requires user login
96 def test_logout_route_requires_login(self):

Callers

nothing calls this directly

Calls 1

is_activeMethod · 0.80

Tested by

no test coverage detected