From b4f461c54f2a220254ac8976451e8ff33fddb982 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 29 Mar 2017 16:52:56 -0500 Subject: [PATCH] Fix EW6 changes to conform to PEP8. --- openlp/plugins/songs/lib/importers/easyworship.py | 6 +++--- tests/functional/openlp_plugins/songs/test_ewimport.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/songs/lib/importers/easyworship.py b/openlp/plugins/songs/lib/importers/easyworship.py index 54327ebfd..244e4a143 100644 --- a/openlp/plugins/songs/lib/importers/easyworship.py +++ b/openlp/plugins/songs/lib/importers/easyworship.py @@ -387,8 +387,8 @@ class EasyWorshipSongImport(SongImport): song_id = song[0] # keep extra copy of title for error message because error check clears it self.title = title = song[1] - self.author = song[2] - self.copyright = song[3] + self.author = song[2] + self.copyright = song[3] self.ccli_number = song[4] words = words_db.execute('SELECT words FROM word WHERE song_id = ?;', (song_id,)) self.set_song_import_object(self.author, words.fetchone()[0].encode()) @@ -396,7 +396,7 @@ class EasyWorshipSongImport(SongImport): self.log_error(self.import_source, translate('SongsPlugin.EasyWorshipSongImport', '"{title}" could not be imported. {entry}'). - format(title=title, entry=self.entry_error_log)) + format(title=title, entry=self.entry_error_log)) # close database handles songs_conn.close() diff --git a/tests/functional/openlp_plugins/songs/test_ewimport.py b/tests/functional/openlp_plugins/songs/test_ewimport.py index 216d1178e..495b2b938 100644 --- a/tests/functional/openlp_plugins/songs/test_ewimport.py +++ b/tests/functional/openlp_plugins/songs/test_ewimport.py @@ -284,7 +284,8 @@ class TestEasyWorshipSongImport(TestCase): get_field_read_calls = test_results[2]['read'] get_field_seek_calls = test_results[2]['seek'] - # THEN: db_get_field should return the appropriate value with the appropriate mocked objects being called + # THEN: db_get_field should return the appropriate value with the appropriate mocked objects being + # called self.assertEqual(importer.db_get_field(field_index), get_field_result) for call in get_field_read_calls: mocked_memo_file.read.assert_any_call(call)