forked from openlp/openlp
PEP8
This commit is contained in:
parent
f089e7522e
commit
0fb445e117
@ -42,25 +42,22 @@ class SongImportTestHelper(TestCase):
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(SongImportTestHelper, self).__init__(*args, **kwargs)
|
||||
self.importer_module = __import__(
|
||||
'openlp.plugins.songs.lib.importers.%s' % self.importer_module_name, fromlist=[self.importer_class_name])
|
||||
self.importer_module = __import__('openlp.plugins.songs.lib.importers.%s' %
|
||||
self.importer_module_name, fromlist=[self.importer_class_name])
|
||||
self.importer_class = getattr(self.importer_module, self.importer_class_name)
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
Patch and set up the mocks required.
|
||||
"""
|
||||
self.add_copyright_patcher = patch(
|
||||
'openlp.plugins.songs.lib.importers.%s.%s.add_copyright' % (self.importer_module_name,
|
||||
self.importer_class_name))
|
||||
self.add_verse_patcher = patch(
|
||||
'openlp.plugins.songs.lib.importers.%s.%s.add_verse' % (self.importer_module_name,
|
||||
self.importer_class_name))
|
||||
self.finish_patcher = patch(
|
||||
'openlp.plugins.songs.lib.importers.%s.%s.finish' % (self.importer_module_name, self.importer_class_name))
|
||||
self.add_author_patcher = patch(
|
||||
'openlp.plugins.songs.lib.importers.%s.%s.add_author' % (self.importer_module_name,
|
||||
self.importer_class_name))
|
||||
self.add_copyright_patcher = patch('openlp.plugins.songs.lib.importers.%s.%s.add_copyright' %
|
||||
(self.importer_module_name, self.importer_class_name))
|
||||
self.add_verse_patcher = patch('openlp.plugins.songs.lib.importers.%s.%s.add_verse' %
|
||||
(self.importer_module_name, self.importer_class_name))
|
||||
self.finish_patcher = patch('openlp.plugins.songs.lib.importers.%s.%s.finish' %
|
||||
(self.importer_module_name, self.importer_class_name))
|
||||
self.add_author_patcher = patch('openlp.plugins.songs.lib.importers.%s.%s.add_author' %
|
||||
(self.importer_module_name, self.importer_class_name))
|
||||
self.song_import_patcher = patch('openlp.plugins.songs.lib.importers.%s.SongImport' %
|
||||
self.importer_module_name)
|
||||
self.mocked_add_copyright = self.add_copyright_patcher.start()
|
||||
|
Loading…
Reference in New Issue
Block a user