Fix tests

This commit is contained in:
Tim Bentley 2018-12-11 20:39:56 +00:00
parent 3478d18ad0
commit 2868320d9d
2 changed files with 5 additions and 2 deletions

View File

@ -437,7 +437,9 @@ class TestPluginManager(TestCase):
mocked_plugin = MagicMock()
mocked_plugin.name = 'Mocked Plugin'
plugin_manager = PluginManager()
plugin_manager.plugins = [mocked_plugin]
Registry().register('mock_plugin', mocked_plugin)
State().add_service("mock", 1, is_plugin=True, status=PluginStatus.Active)
State().flush_preconditions()
# WHEN: We run finalise_plugins()
result = plugin_manager.get_plugin_by_name('Missing Plugin')

View File

@ -162,7 +162,8 @@ class TestServiceItem(TestCase, TestMixin):
assert os.path.normpath(test_file) == os.path.normpath(service_item.get_rendered_frame(0)), \
'The first frame should match the path to the image'
assert frame_array == service_item.get_frames()[0], 'The return should match frame array1'
assert test_file == service_item.get_frame_path(0), 'The frame path should match the full path to the image'
assert test_file == str(service_item.get_frame_path(0)), \
'The frame path should match the full path to the image'
assert image_name == service_item.get_frame_title(0), 'The frame title should match the image name'
assert image_name == service_item.get_display_title(), 'The display title should match the first image name'
assert service_item.is_image() is True, 'This service item should be of an "image" type'