def test_http_get_status_check_false(self): """Confirm the truth check for status response code OK is False for non-existent site""" http = HTTP('http://www.abogussitename.com') self.assertEqual(http.get_status_ok(), False) self.assertEqual( http.res, None ) # confirm that the response object is None when site does not exist
def test_http_get_status_check_true(self): """Confirm the truth check for status response code OK (=200) is True when should be true""" http = HTTP('http://httpbin.org/status/200') self.assertEqual(http.get_status_ok(), True) self.assertEqual( http.res.status_code, 200 ) #confirm that the response object is set after the get_status_ok() call
def test_http_get_status_check_false(self): """Confirm the truth check for status response code OK is False for non-existent site""" http = HTTP('http://www.abogussitename.com') self.assertEqual(http.get_status_ok(), False) self.assertEqual(http.res, None) # confirm that the response object is None when site does not exist
def test_http_get_status_check_true(self): """Confirm the truth check for status response code OK (=200) is True when should be true""" http = HTTP('http://httpbin.org/status/200') self.assertEqual(http.get_status_ok(), True) self.assertEqual(http.res.status_code, 200) #confirm that the response object is set after the get_status_ok() call