def test_check_status_code_ok(self): resp = mock.Mock() resp.status_code = 200 assert utils.check_status_code(resp) is None
def test_check_status_code_fail(self): resp = mock.Mock() resp.status_code = 400 with self.assertRaises(StatusCodeError): utils.check_status_code(resp)
def test_check_status_code_fail(self): resp = Mock() resp.status_code = 400 with self.assertRaises(StatusCodeError): check_status_code(resp)
def test_check_status_code_ok(self): resp = Mock() resp.status_code = 200 assert check_status_code(resp) is None