Esempio n. 1
0
 def test_estimator_url_data(self):
     request = self.req_blank
     response = estimator(request, dob="1955-05-05", income="40000")
     self.assertIsInstance(response.content, bytes)
     rdata = json.loads(response.content)
     for each in self.return_keys:
         self.assertTrue(each in rdata.keys())
Esempio n. 2
0
 def test_estimator_url_data(self):
     request = self.req_blank
     response = estimator(request, dob="1955-05-05", income="40000")
     self.assertTrue(type(response.content) == str)
     rdata = json.loads(response.content)
     for each in self.return_keys:
         self.assertTrue(each in rdata.keys())
Esempio n. 3
0
 def test_estimator_url_data(self):
     request = self.req_blank
     response = estimator(request, dob='1955-05-05', income='40000')
     self.assertTrue(type(response.content) == str)
     rdata = json.loads(response.content)
     for each in self.return_keys:
         self.assertTrue(each in rdata.keys())
Esempio n. 4
0
 def test_estimator_query_data(self):
     request = self.req_good
     response = estimator(request)
     self.assertTrue(response.status_code == 200)
     self.assertTrue(type(response.content) == str)
     rdata = json.loads(response.content)
     for each in self.return_keys:
         self.assertTrue(each in rdata.keys())
Esempio n. 5
0
 def test_estimator_query_data(self):
     request = self.req_good
     response = estimator(request)
     self.assertTrue(response.status_code == 200)
     self.assertTrue(type(response.content) == str)
     rdata = json.loads(response.content)
     for each in self.return_keys:
         self.assertTrue(each in rdata.keys())
Esempio n. 6
0
 def test_estimator_query_data_bad_income(self):
     request = self.req_invalid
     response = estimator(request, dob="1955-05-05")
     self.assertTrue(response.status_code == 400)
Esempio n. 7
0
 def test_estimator_query_data_blank_dob(self):
     request = self.req_blank
     response = estimator(request, income="40000")
     self.assertTrue(response.status_code == 400)
Esempio n. 8
0
 def test_estimator_query_data_blank(self):
     request = self.req_blank
     response = estimator(request)
     self.assertTrue(response.status_code == 400)
Esempio n. 9
0
 def test_estimator_url_data_bad_dob(self):
     request = self.req_blank
     response = estimator(request, dob='1955-05-xx', income='4000')
     self.assertTrue(response.status_code == 400)
Esempio n. 10
0
 def test_estimator_query_data_bad_dob_of_today(self):
     request = self.req_blank
     response = estimator(request, income='40000', dob="%s" % today)
     self.assertTrue(response.status_code == 400)
Esempio n. 11
0
 def test_estimator_query_data_bad_income(self):
     request = self.req_invalid
     response = estimator(request, dob='1955-05-05')
     self.assertTrue(response.status_code == 400)
Esempio n. 12
0
 def test_estimator_query_data_blank_dob(self):
     request = self.req_blank
     response = estimator(request, income='40000')
     self.assertTrue(response.status_code == 400)
Esempio n. 13
0
 def test_estimator_query_data_blank(self):
     request = self.req_blank
     response = estimator(request)
     self.assertTrue(response.status_code == 400)
Esempio n. 14
0
 def test_estimator_url_data_bad_income(self):
     request = self.req_blank
     response = estimator(request, dob="1955-05-05", income="z")
     self.assertTrue(response.status_code == 400)
Esempio n. 15
0
 def test_estimator_url_data_bad_income(self):
     request = self.req_blank
     response = estimator(request, dob='1955-05-05', income='z')
     self.assertTrue(response.status_code == 400)
Esempio n. 16
0
 def test_estimator_url_data_bad_dob(self):
     request = self.req_blank
     response = estimator(request, dob="1955-05-xx", income="4000")
     self.assertTrue(response.status_code == 400)
Esempio n. 17
0
 def test_estimator_query_data_bad_dob(self):
     request = self.req_invalid
     response = estimator(request, income='40000')
     self.assertTrue(response.status_code == 400)