Esempio n. 1
0
 def test_1(self):
     tester = app.test_client(self)
     response = tester.get("/getMakes")
     statuscode = response.status_code
     self.assertEqual(statuscode,200)
Esempio n. 2
0
 def test_7(self):
     tester = app.test_client(self)
     response = tester.get("/getCertainCars?priceStart=70000&priceEnd=200000&mileageStart=30000&mileageEnd=70000")
     contentType = response.content_type
     self.assertEqual(contentType,"application/json")
Esempio n. 3
0
 def test_4(self):
     tester = app.test_client(self)
     response = tester.get("/abc")
     statuscode = response.status_code
     self.assertEqual(statuscode,404)
Esempio n. 4
0
 def test_6(self):
     tester = app.test_client(self)
     response = tester.get("/getCars")
     contentType = response.content_type
     self.assertEqual(contentType,"application/json")
Esempio n. 5
0
 def test_3(self):
     tester = app.test_client(self)
     response = tester.get("/getCertainCars?priceStart=70000&priceEnd=200000&mileageStart=30000&mileageEnd=70000")
     statuscode = response.status_code
     self.assertEqual(statuscode,200)