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

Method test_main_route_requires_login

tests/test_basic.py:16–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

14
15 # Ensure that main page requires user login
16 def test_main_route_requires_login(self):
17 response = self.client.get('/', follow_redirects=True)
18 self.assertIn(b'Please log in to access this page', response.data)
19
20 # Ensure that welcome page loads
21 def test_welcome_route_works_as_expected(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected