Fix a couple of unit tests
This commit is contained in:
parent
639836c248
commit
b4861e4332
2 changed files with 3 additions and 6 deletions
|
@ -174,16 +174,14 @@ class TestHttpErrors(unittest.TestCase):
|
|||
response = self.client.get(self.test_endpoint)
|
||||
self.assertEqual(response["code"], 202)
|
||||
|
||||
# TODO: Status code mismatch should raise an exception
|
||||
@unittest.expectedFailure
|
||||
@httpretty.activate
|
||||
def test_post_with_status_code_mismatch(self):
|
||||
"""
|
||||
Check that a mismatched HTTP status code still returns the
|
||||
JSON status code for post requests.
|
||||
"""
|
||||
data = {"message": "Test Message", "code": 200}
|
||||
self._register_uri(httpretty.POST, data=data, status=202)
|
||||
data = {"message": "Test Message", "code": 202}
|
||||
self._register_uri(httpretty.POST, data=data, status=200)
|
||||
response = self.client.post(self.test_endpoint)
|
||||
self.assertEqual(response["code"], 202)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue