def test_validate_response_201(self): response = MockResponse(201, {}) try: gitter._validate_status_code(response) except gitter.HTTPStatusException: self.fail('Test raised HTTPStatusException unexpectedly!')
def test_response_status_code_not_ok(self): response = MockResponse(404, {}) with self.assertRaises(gitter.HTTPStatusException): gitter._validate_status_code(response)