From 05e44851c28686bd9829bf34c81beb6296a8d742 Mon Sep 17 00:00:00 2001 From: Rebecca Breu Date: Thu, 13 May 2021 18:51:07 +0200 Subject: [PATCH] Fix unittests --- tests/test_main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_main.py b/tests/test_main.py index 233fdca..f48e15e 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -25,8 +25,12 @@ class BeeRefMainWindowTestCase(BeeTestCase): class BeeRefMainTestCase(BeeTestCase): @patch('PyQt6.QtWidgets.QApplication') - def test_run(self, app_mock): + @patch('beeref.__main__.CommandlineArgs') + def test_run(self, args_mock, app_mock): app_mock.return_value = self.app + args_mock.return_value.filename = None + args_mock.return_value.loglevel = 'WARN' with patch.object(self.app, 'exec') as exec_mock: main() + args_mock.assert_called_once_with(with_check=True) exec_mock.assert_called_once_with()