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