forked from openlp/openlp
Fixed if statment logic.
Fixed test
This commit is contained in:
parent
15153ace9c
commit
d1b2cd67c9
@ -78,7 +78,7 @@ class EasyWorshipSongImport(SongImport):
|
||||
def doImport(self):
|
||||
# Open the DB and MB files if they exist
|
||||
import_source_mb = self.import_source.replace('.DB', '.MB')
|
||||
if not (os.path.isfile(self.import_source) or not os.path.isfile(import_source_mb)):
|
||||
if not os.path.isfile(self.import_source) or not os.path.isfile(import_source_mb):
|
||||
return
|
||||
db_size = os.path.getsize(self.import_source)
|
||||
if db_size < 0x800:
|
||||
|
@ -240,7 +240,7 @@ class TestEasyWorshipSongImport(TestCase):
|
||||
patch(u'openlp.plugins.songs.lib.ewimport.os.path') as mocked_os_path:
|
||||
mocked_manager = MagicMock()
|
||||
importer = EasyWorshipSongImport(mocked_manager)
|
||||
mocked_os_path.isfile.return_value = False
|
||||
mocked_os_path.isfile.side_effect = [True, False]
|
||||
|
||||
# WHEN: Supplied with an import source
|
||||
importer.import_source = u'Songs.DB'
|
||||
|
Loading…
Reference in New Issue
Block a user