Пример #1
0
 def test_index(self):
     tester = app.test_client(self)
     response = tester.get('/countries', content_type='html/text')
     self.assertEqual(response.status_code, 200)
Пример #2
0
 def test_fetch_aiports_values(self):
     tester = app.test_client(self)
     response = tester.get('/get_airport_names?param=India',
                           content_type='html/text')
     self.assertTrue(b'Salem' in response.data)
Пример #3
0
 def test_fetch_aiports(self):
     tester = app.test_client(self)
     response = tester.get('/get_airport_names?param=India',
                           content_type='html/text')
     self.assertEqual(response.status_code, 200)
Пример #4
0
 def test_dropdown_value_exists(self):
     tester = app.test_client(self)
     response = tester.get('/countries', content_type='html/text')
     self.assertTrue(b'India' in response.data)
Пример #5
0
 def test_textfield_exists(self):
     tester = app.test_client(self)
     response = tester.get('/countries', content_type='html/text')
     self.assertTrue(b'airportAutocomplete' in response.data)
Пример #6
0
 def test_home_page_loads(self):
     tester = app.test_client(self)
     response = tester.get('/countries', content_type='html/text')
     self.assertTrue(b'Search Airports' in response.data)