From e60dafb8dce589e7deb63fec552f5c05bd19ac6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 16 Feb 2024 19:33:41 +0100 Subject: [PATCH] Improve test compatibility with legacy httpbin index Make the tests slightly more flexible to match both the flasgger-based and legacy httpbin index. This is needed for compatibility with https://github.com/psf/httpbin/pull/44 when flasgger is not installed (e.g. on architectures that are not supported by Rust). --- tests/integration/test_basic.py | 2 +- tests/integration/test_register_persister.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_basic.py b/tests/integration/test_basic.py index bfad6153..99121456 100644 --- a/tests/integration/test_basic.py +++ b/tests/integration/test_basic.py @@ -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): diff --git a/tests/integration/test_register_persister.py b/tests/integration/test_register_persister.py index e904197c..375f14be 100644 --- a/tests/integration/test_register_persister.py +++ b/tests/integration/test_register_persister.py @@ -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):