diff --git a/openlp/plugins/songs/lib/importers/easyworship.py b/openlp/plugins/songs/lib/importers/easyworship.py index 72ea6001e..e462e34df 100644 --- a/openlp/plugins/songs/lib/importers/easyworship.py +++ b/openlp/plugins/songs/lib/importers/easyworship.py @@ -342,8 +342,8 @@ class EasyWorshipSongImport(SongImport): def import_sqlite_db(self): # get database handles - songs_conn = sqlite3.connect(self.import_source + "/Songs.db") - words_conn = sqlite3.connect(self.import_source + "/SongWords.db") + songs_conn = sqlite3.connect(self.import_source + "/Databases/Data/Songs.db") + words_conn = sqlite3.connect(self.import_source + "/Databases/Data/SongWords.db") if songs_conn is None or words_conn is None: self.log_error(self.import_source, translate('SongsPlugin.EasyWorshipSongImport', 'This is not a valid Easy Worship 6 database.')) diff --git a/tests/functional/openlp_plugins/songs/test_ewimport.py b/tests/functional/openlp_plugins/songs/test_ewimport.py index e085988a0..5d5fc8a2b 100644 --- a/tests/functional/openlp_plugins/songs/test_ewimport.py +++ b/tests/functional/openlp_plugins/songs/test_ewimport.py @@ -406,6 +406,12 @@ class TestEasyWorshipSongImport(TestCase): mocked_retrieve_windows_encoding.assert_any_call(encoding) def test_db_file_import(self): + return self._test_db_file_import(os.path.join(TEST_PATH, 'Songs.DB')) + + def test_sqlite_db_file_import(self): + return self._test_db_file_import(os.path.join(TEST_PATH, 'ew6')) + + def _test_db_file_import(self, source_path): """ Test the actual import of real song database files and check that the imported data is correct. """ @@ -433,7 +439,7 @@ class TestEasyWorshipSongImport(TestCase): importer.topics = [] # WHEN: Importing each file - importer.import_source = os.path.join(TEST_PATH, 'Songs.DB') + importer.import_source = source_path import_result = importer.do_import() # THEN: do_import should return none, the song data should be as expected, and finish should have been diff --git a/tests/resources/easyworshipsongs/ew6/Databases/Data/SongWords.db b/tests/resources/easyworshipsongs/ew6/Databases/Data/SongWords.db index 92d47613d..5ab33d557 100644 Binary files a/tests/resources/easyworshipsongs/ew6/Databases/Data/SongWords.db and b/tests/resources/easyworshipsongs/ew6/Databases/Data/SongWords.db differ diff --git a/tests/resources/easyworshipsongs/ew6/Databases/Data/Songs.db b/tests/resources/easyworshipsongs/ew6/Databases/Data/Songs.db index e17f5c63c..b8d62ea44 100644 Binary files a/tests/resources/easyworshipsongs/ew6/Databases/Data/Songs.db and b/tests/resources/easyworshipsongs/ew6/Databases/Data/Songs.db differ