From a62d9c6a41048ab95be046ab7e4722449ba0d3a1 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Mon, 27 Mar 2017 21:39:45 -0700 Subject: [PATCH] Fix one test and remove another that wasn't going to ever work --- .../openlp_core_ui/test_slidecontroller.py | 2 +- .../songs/test_openlpimporter.py | 21 --------- tests/resources/openlpsongs/AmazingGrace.json | 43 ------------------ tests/resources/openlpsongs/songs.sqlite | Bin 69632 -> 0 bytes 4 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 tests/resources/openlpsongs/AmazingGrace.json delete mode 100644 tests/resources/openlpsongs/songs.sqlite diff --git a/tests/functional/openlp_core_ui/test_slidecontroller.py b/tests/functional/openlp_core_ui/test_slidecontroller.py index 1bbf16227..4058f79c2 100644 --- a/tests/functional/openlp_core_ui/test_slidecontroller.py +++ b/tests/functional/openlp_core_ui/test_slidecontroller.py @@ -681,7 +681,7 @@ class TestSlideController(TestCase): slide_controller._process_item(mocked_media_item, 0) # THEN: Registry.execute should have been called to stop the presentation - self.assertEqual(3, mocked_execute.call_count, 'Execute should have been called 3 times') + self.assertEqual(2, mocked_execute.call_count, 'Execute should have been called 2 times') self.assertEqual('mocked_presentation_item_stop', mocked_execute.call_args_list[1][0][0], 'The presentation should have been stopped.') diff --git a/tests/functional/openlp_plugins/songs/test_openlpimporter.py b/tests/functional/openlp_plugins/songs/test_openlpimporter.py index d0e06d50b..3166c1e7d 100644 --- a/tests/functional/openlp_plugins/songs/test_openlpimporter.py +++ b/tests/functional/openlp_plugins/songs/test_openlpimporter.py @@ -22,33 +22,12 @@ """ This module contains tests for the OpenLP song importer. """ -import os from unittest import TestCase from unittest.mock import patch, MagicMock from openlp.core.common import Registry from openlp.plugins.songs.lib.importers.openlp import OpenLPSongImport -from tests.helpers.songfileimport import SongImportTestHelper - -TEST_PATH = os.path.abspath( - os.path.join(os.path.dirname(__file__), '..', '..', '..', 'resources', 'openlpsongs')) - - -class TestOpenLPFileImport(SongImportTestHelper): - - def __init__(self, *args, **kwargs): - self.importer_class_name = 'OpenLPSongImport' - self.importer_module_name = 'openlp' - super(TestOpenLPFileImport, self).__init__(*args, **kwargs) - - def test_song_import(self): - """ - Test that loading an OpenSong file works correctly on various files - """ - self.file_import([os.path.join(TEST_PATH, 'songs.sqlite')], - self.load_external_result_data(os.path.join(TEST_PATH, 'AmazingGrace.json'))) - class TestOpenLPImport(TestCase): """ diff --git a/tests/resources/openlpsongs/AmazingGrace.json b/tests/resources/openlpsongs/AmazingGrace.json deleted file mode 100644 index 4d76e0834..000000000 --- a/tests/resources/openlpsongs/AmazingGrace.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "authors": [ - "John Newton" - ], - "ccli_number": 22025, - "comments": "", - "copyright": "Public Domain ", - "song_book_name": "", - "song_number": 0, - "title": "Amazing Grace", - "topics": [ - "Grace" - ], - "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/openlpsongs/songs.sqlite b/tests/resources/openlpsongs/songs.sqlite deleted file mode 100644 index 32e9ef8203a1484e83c3c221b1bca8c6c25864f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69632 zcmeI*?{C}283%B({vnHwqxi+ZWk!G}4gy(-;#hVZXKn08ag@Z3Be$-zG{_2pmd+9p ziu6dzinCWv3JiNO>`&P1z3IQPf240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