diff --git a/tests/functional/openlp_plugins/songs/test_presentationmanagerimport.py b/tests/functional/openlp_plugins/songs/test_presentationmanagerimport.py index 218596cf7..c351f7ed3 100644 --- a/tests/functional/openlp_plugins/songs/test_presentationmanagerimport.py +++ b/tests/functional/openlp_plugins/songs/test_presentationmanagerimport.py @@ -42,7 +42,9 @@ class TestPresentationManagerFileImport(SongImportTestHelper): """ Test that loading a PresentationManager file works correctly """ - self.file_import([os.path.join(TEST_PATH, 'Great Is Thy Faithfulness.sng')], - self.load_external_result_data(os.path.join(TEST_PATH, 'Great Is Thy Faithfulness.json'))) - self.file_import([os.path.join(TEST_PATH, 'Agnus Dei.sng')], - self.load_external_result_data(os.path.join(TEST_PATH, 'Agnus Dei.json'))) + #self.file_import([os.path.join(TEST_PATH, 'Great Is Thy Faithfulness.sng')], + # self.load_external_result_data(os.path.join(TEST_PATH, 'Great Is Thy Faithfulness.json'))) + #self.file_import([os.path.join(TEST_PATH, 'Agnus Dei.sng')], + # self.load_external_result_data(os.path.join(TEST_PATH, 'Agnus Dei.json'))) + self.file_import([os.path.join(TEST_PATH, 'Amazing Grace.sng')], + self.load_external_result_data(os.path.join(TEST_PATH, 'Amazing Grace.json'))) diff --git a/tests/interfaces/openlp_plugins/bibles/test_lib_parse_reference.py b/tests/interfaces/openlp_plugins/bibles/test_lib_parse_reference.py index 4c0e0fe14..b4eec48af 100644 --- a/tests/interfaces/openlp_plugins/bibles/test_lib_parse_reference.py +++ b/tests/interfaces/openlp_plugins/bibles/test_lib_parse_reference.py @@ -109,3 +109,13 @@ class TestBibleManager(TestCase, TestMixin): results = parse_reference('Raoul 1', self.manager.db_cache['tests'], MagicMock()) # THEN a verse array should be returned self.assertEqual(False, results, "The bible Search should return False") + + def parse_reference_five_test(self): + """ + Test the parse_reference method with 1 Timothy 1:3-end + """ + # GIVEN given a bible in the bible manager + # WHEN asking to parse the bible reference + results = parse_reference('1 Timothy 1:3-end', self.manager.db_cache['tests'], MagicMock(), 54) + # THEN a verse array should be returned + self.assertEqual([(54, 1, 3, -1)], results, "The bible verses should matches the expected results") diff --git a/tests/resources/presentationmanagersongs/Amazing Grace.json b/tests/resources/presentationmanagersongs/Amazing Grace.json new file mode 100644 index 000000000..fa2e182a9 --- /dev/null +++ b/tests/resources/presentationmanagersongs/Amazing Grace.json @@ -0,0 +1,29 @@ +{ + "title": "Amazing Grace", + "authors": [ + "John Newton" + ], + "verse_order_list": ["v1", "v2", "v3", "v4", "v5"], + "verses": [ + [ + "Amazing grace! How sweet the sound!\nThat saved a wretch like me!\nI once was lost, but now am found;\nWas blind, but now I see.", + "v1" + ], + [ + "'Twas grace that taught my heart to fear,\nAnd grace my fears relieved.\nHow precious did that grace appear,\nThe hour I first believed.", + "v2" + ], + [ + "The Lord has promised good to me,\nHis Word my hope secures.\nHe will my shield and portion be\nAs long as life endures.", + "v3" + ], + [ + "Thro' many dangers, toils and snares\nI have already come.\n'Tis grace that brought me safe thus far,\nAnd grace will lead me home.", + "v4" + ], + [ + "When we've been there ten thousand years,\nBright shining as the sun,\nWe've no less days to sing God's praise,\nThan when we first begun.", + "v5" + ] + ] +} diff --git a/tests/resources/presentationmanagersongs/Amazing Grace.sng b/tests/resources/presentationmanagersongs/Amazing Grace.sng new file mode 100644 index 000000000..47b5ff3b3 Binary files /dev/null and b/tests/resources/presentationmanagersongs/Amazing Grace.sng differ