forked from openlp/openlp
Changed to using super()
This commit is contained in:
parent
ca3e32c294
commit
91bb04f03a
@ -11,10 +11,10 @@ class SongImportTestHelper(TestCase):
|
||||
This class is designed to be a helper class to reduce repition when testing the import of song files.
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(SongImportTestHelper, self).__init__(*args, **kwargs)
|
||||
self.importer_module = __import__(
|
||||
'openlp.plugins.songs.lib.%s' % self.importer_module_name, fromlist=[self.importer_class_name])
|
||||
self.importer_class = getattr(self.importer_module, self.importer_class_name)
|
||||
TestCase.__init__(self, *args, **kwargs)
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
|
@ -17,7 +17,7 @@ class TestSongShowPlusFileImport(SongImportTestHelper):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.importer_class_name = 'SongShowPlusImport'
|
||||
self.importer_module_name = 'songshowplusimport'
|
||||
SongImportTestHelper.__init__(self, *args, **kwargs)
|
||||
super(TestSongShowPlusFileImport, self).__init__(*args, **kwargs)
|
||||
|
||||
def test_song_import(self):
|
||||
test_import = self.file_import(os.path.join(TEST_PATH, 'Amazing Grace.sbsong'),
|
||||
|
Loading…
Reference in New Issue
Block a user