From c49b1b951c80f483de6d2ac3f0ba7417faa03548 Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Thu, 5 Sep 2024 11:31:59 +0100 Subject: [PATCH] Fix base model formatting test --- tests/test_cli.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index ab725c005..8a34b0a13 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -150,7 +150,7 @@ def test_valid_stomp_config_for_listener(runner: CliRunner): ) assert ( result.output - == "Subscribing to all bluesky events from localhost:61613\nPress enter to exit" + == "Subscribing to all bluesky events from localhost:61613\nPress enter to exit\n" ) assert result.exit_code == 0 @@ -511,19 +511,7 @@ def test_unknown_object_formatting(): def test_generic_base_model_formatting(): output = StringIO() obj = ExtendedModel(name="foo", keys=[1, 2, 3], metadata={"fizz": "buzz"}) - exp = dedent("""\ - { - "name": "foo", - "keys": [ - 1, - 2, - 3 - ], - "metadata": { - "fizz": "buzz" - } - } - """) + exp = '{"name": "foo", "keys": [1, 2, 3], "metadata": {"fizz": "buzz"}}\n' OutputFormat.JSON.display(obj, output) assert exp == output.getvalue()