Fix EW6 changes to conform to PEP8.

This commit is contained in:
Gary Talent 2017-03-29 16:52:56 -05:00
parent 5209daab45
commit b4f461c54f
2 changed files with 5 additions and 4 deletions

View File

@ -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()

View File

@ -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)