diff --git a/tests/test_cli.py b/tests/test_cli.py index 67e755a..e471e9a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -42,11 +42,13 @@ def test_file_input(monkeypatch: MonkeyPatch, tmp_path: Path) -> None: def test_initial_pattern(monkeypatch: MonkeyPatch, tmp_path: Path) -> None: runner = CliRunner() + text = "This iS! aTe xt2 F0r T3sT!ng" + (tmp_path / "text_file").write_text(text) class_mock = Mock() instance_mock = Mock() with monkeypatch.context(): class_mock.return_value = instance_mock monkeypatch.setattr("rexi.cli.RexiApp", class_mock) - result = runner.invoke(app, input="", args=["-p", "(wtf)"]) - print(result.output) - class_mock.assert_called_once_with("", initial_pattern="(wtf)") + runner.invoke(app, args=["-i", str(tmp_path / "text_file"), "--pattern", "wtf"]) + class_mock.assert_called_once_with(text, initial_pattern="wtf") + \ No newline at end of file