Example #1
0
 def testing_FindingR0(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=UAE&status=Find R0").status, '200 OK')
Example #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)
Example #3
0
 def testing_DailyDeaths(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=palastine&status=deaths").status, '200 OK')
Example #4
0
 def testing_DeathsCum(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=Russia&status=deaths_cum").status, '200 OK')
Example #5
0
 def testing_DailyCases(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=ksa&status=cases").status, '200 OK')
Example #6
0
 def testing_daily_deaths(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=germany&status=deaths").status, '200 OK')
Example #7
0
 def testing_CasesCum(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=spain&status=cases_cum").status, '200 OK')
Example #8
0
 def testing_daily_cases(self):
     tester = app.test_client(self)
     self.assertEqual(
         tester.get("/?country=france&status=cases").status, '200 OK')
Example #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')
Example #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
Example #11
0
 def test_message(self):
     tester = app.test_client(self)
     response = tester.get("/")
     self.assertTrue(b'cases' in response.data)
Example #12
0
 def test_content(self):
     tester = app.test_client(self)
     response = tester.get("/")
     self.assertEqual(response.content_type, 'text/html; charset=utf-8')