Skip to content

Commit

Permalink
Fix wrong test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndiritu committed Dec 16, 2024
1 parent 5477018 commit f1bf6af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/requests/test_batch_request_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ def test_serialize(batch_request_content):
writer = Mock(spec=SerializationWriter)
batch_request_content.serialize(writer)
writer.write_collection_of_object_values.assert_called_once_with(
"requests", batch_request_content.requests
"requests", list(batch_request_content.requests.values())
)
4 changes: 2 additions & 2 deletions tests/requests/test_batch_request_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ def test_id_property(batch_request_item):
def test_headers_property(batch_request_item):
new_headers = {"Authorization": "Bearer token"}
batch_request_item.headers = new_headers
assert batch_request_item.headers["Authorization"] == "Bearer token"
assert batch_request_item.headers["authorization"] == "Bearer token"


def test_body_property(batch_request_item):
new_body = StreamInterface(b'{"new_key": "new_value"}')
batch_request_item.body = new_body
assert batch_request_item.body.read() == b'{"new_key": "new_value"}'
assert batch_request_item.body == b'{"new_key": "new_value"}'


def test_method_property(batch_request_item):
Expand Down

0 comments on commit f1bf6af

Please sign in to comment.