Changed to using super()

This commit is contained in:
Philip Ridout 2013-09-17 21:31:19 +01:00
parent ca3e32c294
commit 91bb04f03a
2 changed files with 2 additions and 2 deletions

View File

@ -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. This class is designed to be a helper class to reduce repition when testing the import of song files.
""" """
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(SongImportTestHelper, self).__init__(*args, **kwargs)
self.importer_module = __import__( self.importer_module = __import__(
'openlp.plugins.songs.lib.%s' % self.importer_module_name, fromlist=[self.importer_class_name]) '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) self.importer_class = getattr(self.importer_module, self.importer_class_name)
TestCase.__init__(self, *args, **kwargs)
def setUp(self): def setUp(self):
""" """

View File

@ -17,7 +17,7 @@ class TestSongShowPlusFileImport(SongImportTestHelper):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
self.importer_class_name = 'SongShowPlusImport' self.importer_class_name = 'SongShowPlusImport'
self.importer_module_name = 'songshowplusimport' self.importer_module_name = 'songshowplusimport'
SongImportTestHelper.__init__(self, *args, **kwargs) super(TestSongShowPlusFileImport, self).__init__(*args, **kwargs)
def test_song_import(self): def test_song_import(self):
test_import = self.file_import(os.path.join(TEST_PATH, 'Amazing Grace.sbsong'), test_import = self.file_import(os.path.join(TEST_PATH, 'Amazing Grace.sbsong'),