From 7fc55e3e40b19fc1035b8cc182f94876969bf86d Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 22 Feb 2020 21:16:40 +0000 Subject: [PATCH] Fix appvoyer yet another go. --- tests/functional/openlp_core/ui/test_icons.py | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/tests/functional/openlp_core/ui/test_icons.py b/tests/functional/openlp_core/ui/test_icons.py index 72ba7a01b..1b66e08fc 100644 --- a/tests/functional/openlp_core/ui/test_icons.py +++ b/tests/functional/openlp_core/ui/test_icons.py @@ -21,23 +21,21 @@ Package to test the openlp.core.ui.icons package. """ from unittest.mock import patch - from PyQt5 import QtGui from openlp.core.ui.icons import UiIcons -@patch('openlp.core.ui.icons.UiIcons.__init__', return_value=None) def test_simple_icon(settings): # GIVEN: an basic set of icons - icons = UiIcons() - icon_list = { - 'active': {'icon': 'fa.child'} + with patch('openlp.core.ui.icons.UiIcons.__init__', return_value=None): + icons = UiIcons() + icon_list = { + 'active': {'icon': 'fa.child'} + } - } - - icons.load_icons(icon_list) - # WHEN: I use the icons - icon_active = UiIcons().active - # THEN: I should have an icon - assert isinstance(icon_active, QtGui.QIcon) + icons.load_icons(icon_list) + # WHEN: I use the icons + icon_active = UiIcons().active + # THEN: I should have an icon + assert isinstance(icon_active, QtGui.QIcon)