forked from openlp/openlp
Fix EW6 changes to conform to PEP8.
This commit is contained in:
parent
5209daab45
commit
b4f461c54f
@ -387,8 +387,8 @@ class EasyWorshipSongImport(SongImport):
|
|||||||
song_id = song[0]
|
song_id = song[0]
|
||||||
# keep extra copy of title for error message because error check clears it
|
# keep extra copy of title for error message because error check clears it
|
||||||
self.title = title = song[1]
|
self.title = title = song[1]
|
||||||
self.author = song[2]
|
self.author = song[2]
|
||||||
self.copyright = song[3]
|
self.copyright = song[3]
|
||||||
self.ccli_number = song[4]
|
self.ccli_number = song[4]
|
||||||
words = words_db.execute('SELECT words FROM word WHERE song_id = ?;', (song_id,))
|
words = words_db.execute('SELECT words FROM word WHERE song_id = ?;', (song_id,))
|
||||||
self.set_song_import_object(self.author, words.fetchone()[0].encode())
|
self.set_song_import_object(self.author, words.fetchone()[0].encode())
|
||||||
@ -396,7 +396,7 @@ class EasyWorshipSongImport(SongImport):
|
|||||||
self.log_error(self.import_source,
|
self.log_error(self.import_source,
|
||||||
translate('SongsPlugin.EasyWorshipSongImport',
|
translate('SongsPlugin.EasyWorshipSongImport',
|
||||||
'"{title}" could not be imported. {entry}').
|
'"{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
|
# close database handles
|
||||||
songs_conn.close()
|
songs_conn.close()
|
||||||
|
@ -284,7 +284,8 @@ class TestEasyWorshipSongImport(TestCase):
|
|||||||
get_field_read_calls = test_results[2]['read']
|
get_field_read_calls = test_results[2]['read']
|
||||||
get_field_seek_calls = test_results[2]['seek']
|
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)
|
self.assertEqual(importer.db_get_field(field_index), get_field_result)
|
||||||
for call in get_field_read_calls:
|
for call in get_field_read_calls:
|
||||||
mocked_memo_file.read.assert_any_call(call)
|
mocked_memo_file.read.assert_any_call(call)
|
||||||
|
Loading…
Reference in New Issue
Block a user