From 5c1d3aeef066d7366d05f91b18769f74a3cbe31e Mon Sep 17 00:00:00 2001 From: "Christian T. Jacobs" Date: Sat, 24 Jun 2017 21:03:31 +0100 Subject: [PATCH] flake8. --- tests/test_logbook.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_logbook.py b/tests/test_logbook.py index f76e7d8..7b00da7 100644 --- a/tests/test_logbook.py +++ b/tests/test_logbook.py @@ -25,6 +25,7 @@ except ImportError: import os from pyqso.logbook import * + class TestLogbook(unittest.TestCase): """ The unit tests for the Logbook class. """ @@ -121,10 +122,9 @@ class TestLogbook(unittest.TestCase): @mock.patch('pyqso.auxiliary_dialogs.handle_gtk_dialog') @mock.patch('pyqso.logbook.LogNameDialog') def test_new_log(self, mock_LogNameDialog, mock_handle_gtk_dialog, mock_render_log): - """ Start off with an empty logbook and check that a new log can successfully be added. """ - f = open("Logbook.test_new_log.db", "w").close() + """ Create an empty logbook file, open it, and check that a new log can successfully be added. """ + open("Logbook.test_new_log.db", "w").close() opened = self.logbook.open(path="Logbook.test_new_log.db") - self.logbook.summary = mock.MagicMock() assert(opened) mock_LogNameDialog().dialog.run.return_value = Gtk.ResponseType.OK mock_LogNameDialog().name = "my_new_log"