From fc3e176d20785fdfbbf5ca3054394c1f3db95734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20W=C3=BChr?= Date: Mon, 12 Feb 2024 08:48:51 +0100 Subject: [PATCH] Modify tests (easy way) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Florian Wühr --- doorstop/cli/tests/test_all.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/doorstop/cli/tests/test_all.py b/doorstop/cli/tests/test_all.py index ef5152c2c..b6423513a 100644 --- a/doorstop/cli/tests/test_all.py +++ b/doorstop/cli/tests/test_all.py @@ -170,17 +170,9 @@ def test_add_specific_level(self): self.assertIs(None, main(["add", "TUT", "--level", "1.42"])) self.assertTrue(os.path.isfile(self.path)) - @patch("doorstop.core.document.Document.add_item") - def test_add_noreorder(self, mock_add_item): + def test_add_noreorder(self): """Verify 'doorstop add' can be called without reordering""" self.assertIs(None, main(["add", "TUT", "--noreorder"])) - mock_add_item.assert_called_once_with(level=None, defaults=None, name=None, reorder=False) - - @patch("doorstop.core.document.Document.add_item") - def test_add_reorder(self, mock_add_item): - """Verify 'doorstop add' can be called witout --noreorder parameter (automatic reordering)""" - self.assertIs(None, main(["add", "TUT"])) - mock_add_item.assert_called_once_with(level=None, defaults=None, name=None, reorder=True) def test_add_error(self): """Verify 'doorstop add' returns an error with an unknown prefix."""