From e903c69a071e903f13f747eda7a48806f4c33415 Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Wed, 27 Apr 2022 09:13:19 +0200 Subject: [PATCH] refactoring --- test/exploration_tests/partial_response_test.py | 2 +- test/fixtures/server.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/exploration_tests/partial_response_test.py b/test/exploration_tests/partial_response_test.py index 1a61132..8c119c7 100644 --- a/test/exploration_tests/partial_response_test.py +++ b/test/exploration_tests/partial_response_test.py @@ -22,7 +22,7 @@ def test_sending_partial_request(url, data_items, metadata): packages = starmap(pack, zip(repeat(metadata), data_items)) responses = map(post, chain(packages, [""])) - payloads = (json.loads(r.json()) for r in responses) + payloads = (r.json() for r in responses) data = map(string_to_bytes, chain.from_iterable(pluck("data", payloads))) assert list(data) == [b"CONTENT"] * 7 diff --git a/test/fixtures/server.py b/test/fixtures/server.py index 07a95d7..a906bb5 100644 --- a/test/fixtures/server.py +++ b/test/fixtures/server.py @@ -65,9 +65,7 @@ def make_string_processor(): buffer.append(data) response_payload = {"data": result} - response = json.dumps(response_payload) - - return response + return response_payload buffer = []