From 4b9bb5cb468909eb55fded8b30bb9647720babed Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 1 Oct 2024 19:13:33 -0700 Subject: [PATCH] fix failing test --- tests/unit/test_export.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/unit/test_export.py b/tests/unit/test_export.py index 10e9dd6b..af56d953 100644 --- a/tests/unit/test_export.py +++ b/tests/unit/test_export.py @@ -6,9 +6,6 @@ from unittest import mock import pytest from jrnl.exception import JrnlException -from jrnl.messages import Message -from jrnl.messages import MsgStyle -from jrnl.messages import MsgText from jrnl.plugins.fancy_exporter import check_provided_linewrap_viability from jrnl.plugins.yaml_exporter import YAMLExporter @@ -36,12 +33,8 @@ class TestFancy: class TestYaml: - @mock.patch("jrnl.plugins.yaml_exporter.YAMLExporter.export_journal") @mock.patch("builtins.open") - def test_export_to_nonexisting_folder(self, mock_open, mock_export_journal): - mock_export_journal.side_effect = JrnlException( - Message(MsgText.YamlMustBeDirectory, MsgStyle.ERROR) - ) + def test_export_to_nonexisting_folder(self, mock_open): with pytest.raises(JrnlException): YAMLExporter.write_file("journal", "non-existing-path") mock_open.assert_not_called()