We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de9922a commit 1fe7096Copy full SHA for 1fe7096
tests/cli/test_generate_route_manifest_cli.py
@@ -0,0 +1,26 @@
1
+import sys
2
+
3
+from pytest_mock import MockerFixture
4
5
+from murfey.cli.generate_route_manifest import run
6
7
8
+def test_run(
9
+ mocker: MockerFixture,
10
+):
11
+ # Mock out print() and exit()
12
+ mock_print = mocker.patch("builtins.print")
13
+ mock_exit = mocker.patch("builtins.exit")
14
15
+ # Run the function with its args
16
+ sys.argv = ["--debug"]
17
+ run()
18
19
+ # Check that the final print message and exit() are called
20
+ print_calls = mock_print.call_args_list
21
+ last_print_call = print_calls[-1]
22
+ last_printed = last_print_call.args[0]
23
+ assert last_printed.startswith(
24
+ "Route manifest for instrument and backend servers saved to"
25
+ )
26
+ mock_exit.assert_called_once()
0 commit comments