示例#1
0
 def testing_FindingR0(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=UAE&status=Find R0").status, '200 OK')
示例#2
0
 def test_response(self):
     #        self.assertEqual(resp.status,'200 OK')
     tester = app.test_client(self)
     response = tester.get("/")
     statuscode = response.status_code
     self.assertEqual(statuscode, 200)
示例#3
0
 def testing_DailyDeaths(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=palastine&status=deaths").status, '200 OK')
示例#4
0
 def testing_DeathsCum(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=Russia&status=deaths_cum").status, '200 OK')
示例#5
0
 def testing_DailyCases(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=ksa&status=cases").status, '200 OK')
示例#6
0
 def testing_daily_deaths(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=germany&status=deaths").status, '200 OK')
示例#7
0
 def testing_CasesCum(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=spain&status=cases_cum").status, '200 OK')
示例#8
0
 def testing_daily_cases(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=france&status=cases").status, '200 OK')
示例#9
0
 def testing_cases_cum(self):
     tester = app.test_client(self)
     #        response = tester.get("/")
     self.assertEqual(
         tester.get("/?country=egypt&status=cases_cum").status, '200 OK')
示例#10
0
 def test_welcome_route_works_as_expected(self):
     tester = app.test_client(self)
     response = tester.get("/")
     self.assertIn(b'COVID-19 Monitor',
                   response.data)  # Ensure that welcome page loads
示例#11
0
 def test_message(self):
     tester = app.test_client(self)
     response = tester.get("/")
     self.assertTrue(b'cases' in response.data)
示例#12
0
 def test_content(self):
     tester = app.test_client(self)
     response = tester.get("/")
     self.assertEqual(response.content_type, 'text/html; charset=utf-8')