forked from openlp/openlp
Use patch decorator for test.
This commit is contained in:
parent
33a4e00002
commit
fe40cb6eec
@ -244,12 +244,12 @@ class TestServiceItem(TestCase):
|
||||
self.assertEqual(service_item.service_item_type, ServiceItemType.Command, 'It should be a Command')
|
||||
self.assertEqual(service_item.get_frames()[0], frame, 'Frames should match')
|
||||
|
||||
def add_from_command_for_a_presentation_thumb_test(self):
|
||||
@patch('openlp.core.lib.serviceitem.AppLocation.get_section_data_path')
|
||||
def add_from_command_for_a_presentation_thumb_test(self, mocked_get_section_data_path):
|
||||
"""
|
||||
Test the Service Item - adding a presentation, and updating the thumb path
|
||||
"""
|
||||
# GIVEN: A service item, a mocked icon and presentation data
|
||||
with patch('openlp.core.lib.serviceitem.AppLocation.get_section_data_path') as mocked_get_section_data_path:
|
||||
# GIVEN: A service item, a mocked AppLocation and presentation data
|
||||
mocked_get_section_data_path.return_value = os.path.join('mocked', 'section', 'path')
|
||||
service_item = ServiceItem(None)
|
||||
service_item.has_original_files = False
|
||||
|
Loading…
Reference in New Issue
Block a user