Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/handlers/test_destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_discord_notify_calls_requests_post():

mock_post.assert_called_once_with(
"https://discordapp.com/api/webhooks/test",
data=json.dumps(expected_payload),
data=json.dumps(expected_payload, separators=(',', ':')), # orjson.dumps always uses compact separators
headers={"Content-Type": "application/json"},
timeout=5.0,
)
Expand Down Expand Up @@ -248,7 +248,7 @@ def test_slack_notify_calls_requests_post():

mock_post.assert_called_once_with(
"https://slack.com/api/api.test",
data=json.dumps(expected_payload).encode(),
data=json.dumps(expected_payload, separators=(',', ':')).encode(),
timeout=5.0,
)

Expand Down Expand Up @@ -508,7 +508,7 @@ def test_datadog_notify_calls_requests_post():

mock_post.assert_called_once_with(
"https://api.datadoghq.com/api/v1/events",
data=json.dumps(expected_payload),
data=json.dumps(expected_payload, separators=(',', ':')),
headers={
"Accept": "application/json",
"Content-Type": "application/json",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ def test_list(self):
Id: 3
Name: Atest
Type: sqlite
Options: {"dbpath": "/tmp/test.db"}
Options: {"dbpath":"/tmp/test.db"}
--------------------
Id: 1
Name: test1
Type: pg
Options: {"dbname": "testdb1", "host": "example.com"}
Options: {"dbname":"testdb1","host":"example.com"}
--------------------
Id: 2
Name: test2
Type: sqlite
Options: {"dbpath": "/tmp/test.db"}
Options: {"dbpath":"/tmp/test.db"}
"""
self.assertMultiLineEqual(result.output, textwrap.dedent(expected_output).lstrip())

Expand Down