Fix unit tests

This commit is contained in:
Rebecca Breu 2021-05-14 13:50:15 +02:00
parent 5f4d008203
commit 6a9605694e

View file

@ -286,8 +286,10 @@ class BeeGraphicsViewTestCase(ViewBaseTestCase):
@patch('beeref.gui.DebugLogDialog.show')
def test_on_action_debuglog(self, show_mock):
self.view.on_action_debuglog()
show_mock.assert_called_once()
with tempfile.NamedTemporaryFile() as f:
with patch('beeref.gui.logfile_name', return_value=f.name):
self.view.on_action_debuglog()
show_mock.assert_called_once()
@patch('beeref.scene.BeeGraphicsScene.clearSelection')
@patch('PyQt6.QtWidgets.QFileDialog.getOpenFileNames')