Skip to content

Commit 6defa05

Browse files
committed
better coverage of teufa.server.Application
1 parent 414a40a commit 6defa05

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

tests/test_cli.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,14 @@
55
import teufa.cli
66

77

8-
@patch("teufa.server.Application")
9-
def test_cli_server(MockApplication):
8+
@patch("teufa.server.Application.run")
9+
def test_cli_server(mock_run):
1010
runner = CliRunner()
1111

1212
result = runner.invoke(teufa.cli.server)
1313
assert result.exit_code == 0
1414

15-
MockApplication.assert_called_once_with(
16-
{
17-
"bind": "127.0.0.1:8000",
18-
"reload": False,
19-
}
20-
)
21-
MockApplication.return_value.run.assert_called_once_with()
15+
mock_run.assert_called_once_with()
2216

2317

2418
@patch("teufa.server.Application")

0 commit comments

Comments
 (0)