From 538e885cfb3e02d04e2ff2c18fc1f8099bcbf5fc Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 3 Jul 2013 17:34:02 +0100 Subject: [PATCH 1/2] Fix broken test --- tests/functional/openlp_core_lib/test_serviceitem.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/openlp_core_lib/test_serviceitem.py b/tests/functional/openlp_core_lib/test_serviceitem.py index 4e777b953..f970eba22 100644 --- a/tests/functional/openlp_core_lib/test_serviceitem.py +++ b/tests/functional/openlp_core_lib/test_serviceitem.py @@ -272,13 +272,13 @@ class TestServiceItem(TestCase): service_item.add_icon = MagicMock() # WHEN: adding an media from a saved Service and mocked exists - line = self.convert_file_service_item(u'migrate_video_20_22.osd') + line = read_service_from_file(u'migrate_video_20_22.osd') with patch('os.path.exists'): - service_item.set_from_service(line, TEST_PATH) + service_item.set_from_service(line[0], TEST_RESOURCES_PATH) # THEN: We should get back a converted service item assert service_item.is_valid is True, u'The new service item should be valid' - assert service_item.processor is None, u'The Processor should have been set' - assert service_item.title is None, u'The title should be set to a value' + assert service_item.processor is not None, u'The Processor should have been set' + assert service_item.title is not None, u'The title should be set to a value' assert service_item.is_capable(ItemCapabilities.HasDetailedTitleDisplay) is False, \ u'The Capability should have been removed' From ab3fd38551044f4530eafb2dda88b54dbca23522 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 3 Jul 2013 17:34:40 +0100 Subject: [PATCH 2/2] Fix broken test --- tests/functional/openlp_core_lib/test_serviceitem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/openlp_core_lib/test_serviceitem.py b/tests/functional/openlp_core_lib/test_serviceitem.py index f970eba22..fdeb081b3 100644 --- a/tests/functional/openlp_core_lib/test_serviceitem.py +++ b/tests/functional/openlp_core_lib/test_serviceitem.py @@ -278,7 +278,7 @@ class TestServiceItem(TestCase): # THEN: We should get back a converted service item assert service_item.is_valid is True, u'The new service item should be valid' - assert service_item.processor is not None, u'The Processor should have been set' + assert service_item.processor == u'VLC', u'The Processor should have been set' assert service_item.title is not None, u'The title should be set to a value' assert service_item.is_capable(ItemCapabilities.HasDetailedTitleDisplay) is False, \ u'The Capability should have been removed'