def test_index(self): tester = app.test_client(self) response = tester.get('/') print(response.status_code) self.assertEqual(response.status_code, 200)
def call_client(request): client = app.test_client() return client
def call_client(requests) : client = app.test_client() # wheather = app.test_weather() return client
def call_user(request): user = app.test_client() return user
def test_admin_index(self): rv = app.test_client().get('/admin/') self.assertIn('<h1>Admin Index</h1>', rv.data)
def test_index(self): rv = app.test_client().get('/') self.assertIn('<h1>Index</h1>', rv.data)