diff options
| author | Jamie Lennox <jamielennox@redhat.com> | 2014-01-15 12:15:05 +1000 |
|---|---|---|
| committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-01-15 17:20:48 +0100 |
| commit | 9357c8c22f4d3c403df30510344a484027072fb9 (patch) | |
| tree | 4d9c690b3bc90068ed094fbfe27165a2208fee5e | |
| parent | be9ccb301f95fde988d45ac6abb2c4de4b6871ee (diff) | |
| download | httpretty-9357c8c22f4d3c403df30510344a484027072fb9.tar.gz | |
Fix test that checks ID rather than equality
CPython does not guarantee that the id() of integers will be the same
and they should therefore be tested with standard equality.
| -rw-r--r-- | tests/functional/test_requests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional/test_requests.py b/tests/functional/test_requests.py index 721312d..de0e118 100644 --- a/tests/functional/test_requests.py +++ b/tests/functional/test_requests.py @@ -460,7 +460,7 @@ def test_callback_setting_headers_and_status_response(now): response = requests.get('https://api.yahoo.com/test') expect(response.text).to.equal("The GET response from https://api.yahoo.com/test") expect(response.headers).to.have.key('a').being.equal("b") - expect(response.status_code).to.be(418) + expect(response.status_code).to.equal(418) HTTPretty.register_uri( HTTPretty.POST, "https://api.yahoo.com/test_post", @@ -473,7 +473,7 @@ def test_callback_setting_headers_and_status_response(now): expect(response.text).to.equal("The POST response from https://api.yahoo.com/test_post") expect(response.headers).to.have.key('a').being.equal("b") - expect(response.status_code).to.be(418) + expect(response.status_code).to.equal(418) @httprettified def test_httpretty_should_allow_registering_regexes_and_give_a_proper_match_to_the_callback(): |
