Skip to content

Commit

Permalink
Improve test compatibility with legacy httpbin index
Browse files Browse the repository at this point in the history
Make the tests slightly more flexible to match both the flasgger-based
and legacy httpbin index.  This is needed for compatibility with
psf/httpbin#44 when flasgger is not installed
(e.g. on architectures that are not supported by Rust).
  • Loading branch information
mgorny committed Feb 16, 2024
1 parent 3ce5979 commit e60dafb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/integration/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_basic_json_use(tmpdir, httpbin):
test_fixture = str(tmpdir.join("synopsis.json"))
with vcr.use_cassette(test_fixture, serializer="json"):
response = urlopen(httpbin.url).read()
assert b"A simple HTTP Request & Response Service." in response
assert b"HTTP Request & Response Service" in response


def test_patched_content(tmpdir, httpbin):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_register_persister.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_load_cassette_with_custom_persister(tmpdir, httpbin):

with my_vcr.use_cassette(test_fixture, serializer="json"):
response = urlopen(httpbin.url).read()
assert b"A simple HTTP Request & Response Service." in response
assert b"HTTP Request & Response Service" in response


def test_load_cassette_persister_exception_handling(tmpdir, httpbin):
Expand Down

0 comments on commit e60dafb

Please sign in to comment.