Skip to content

Commit

Permalink
Bump respx from 0.21.0 to 0.22.0 (#197)
Browse files Browse the repository at this point in the history
* Bump respx from 0.21.0 to 0.22.0

Bumps [respx](https://github.com/lundberg/respx) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/lundberg/respx/releases)
- [Changelog](https://github.com/lundberg/respx/blob/master/CHANGELOG.md)
- [Commits](lundberg/respx@0.21.0...0.22.0)

---
updated-dependencies:
- dependency-name: respx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Compare against compact JSON representation

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jon Parise <[email protected]>
  • Loading branch information
dependabot[bot] and jparise authored Dec 20, 2024
1 parent fe04249 commit e8c5e20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dev = [
"mypy==1.13.0",
"pytest==8.3.1",
"pytest-cov==6.0.0",
"respx==0.21.0",
"respx==0.22.0",
"ruff==0.8.0",
]

Expand Down
10 changes: 8 additions & 2 deletions tests/test_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ def test_write_message(self, local_client: LocalClient, respx_mock: MockRouter):
respx_mock.post("http://vestaboard.local:7000/local-api/message").respond(201)
assert local_client.write_message(chars)
assert respx_mock.calls.called
assert respx_mock.calls.last.request.content == json.dumps(chars).encode()
assert (
respx_mock.calls.last.request.content
== json.dumps(chars, separators=(",", ":")).encode()
)

def test_write_message_dimensions(self, local_client: LocalClient):
with pytest.raises(ValueError, match=rf"expected a \({COLS}, {ROWS}\) array"):
Expand Down Expand Up @@ -227,7 +230,10 @@ def test_write_message_list(
respx_mock.post("https://rw.vestaboard.com/").respond(200)
assert rw_client.write_message(chars)
assert respx_mock.calls.called
assert respx_mock.calls.last.request.content == json.dumps(chars).encode()
assert (
respx_mock.calls.last.request.content
== json.dumps(chars, separators=(",", ":")).encode()
)

def test_write_message_list_dimensions(self, rw_client: ReadWriteClient):
with pytest.raises(ValueError, match=rf"expected a \({COLS}, {ROWS}\) array"):
Expand Down

0 comments on commit e8c5e20

Please sign in to comment.