14
0
forked from pool/python-zeep
Files
python-zeep/httpx-test.patch
Matej Cepl 88a68a3f60 Accepting request 961421 from home:wrosenauer:devel
- Update to 4.1.0
  * Remove last dependency on six
  * Use platformdirs instead of the appsdirs dependency
  * Pass digest method when signing timestamp node
  * Fix settings context manager when an exception is raised
  * Don’t render decimals using scientific notation
  * Remove dependency on defusedxml
  * Improve handling of str values for Duration
- added httpx-test.patch to use text instead of data

OBS-URL: https://build.opensuse.org/request/show/961421
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zeep?expand=0&rev=10
2022-03-13 20:50:43 +00:00

41 lines
1.8 KiB
Diff

diff --git a/tests/test_async_transport.py b/tests/test_async_transport.py
index 940b48a..7cce440 100644
--- a/tests/test_async_transport.py
+++ b/tests/test_async_transport.py
@@ -21,7 +21,7 @@ def test_load(httpx_mock):
cache = stub(get=lambda url: None, add=lambda url, content: None)
transport = AsyncTransport(cache=cache)
- httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", data="x")
+ httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", text="x")
result = transport.load("http://tests.python-zeep.org/test.xml")
assert result == b"x"
@@ -32,7 +32,7 @@ def test_load_cache(httpx_mock):
cache = InMemoryCache()
transport = AsyncTransport(cache=cache)
- httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", data="x")
+ httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", text="x")
result = transport.load("http://tests.python-zeep.org/test.xml")
assert result == b"x"
@@ -47,7 +47,7 @@ async def test_post(httpx_mock: HTTPXMock):
envelope = etree.Element("Envelope")
- httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", data="x")
+ httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", text="x")
result = await transport.post_xml(
"http://tests.python-zeep.org/test.xml", envelope=envelope, headers={}
)
@@ -69,7 +69,7 @@ async def test_http_error(httpx_mock: HTTPXMock):
transport = AsyncTransport()
httpx_mock.add_response(
- url="http://tests.python-zeep.org/test.xml", data="x", status_code=500
+ url="http://tests.python-zeep.org/test.xml", text="x", status_code=500
)
with pytest.raises(exceptions.TransportError) as exc:
transport.load("http://tests.python-zeep.org/test.xml")