forked from openlp/openlp
Fix appvoyer yet another go.
This commit is contained in:
parent
fbcf47c86a
commit
7fc55e3e40
@ -21,23 +21,21 @@
|
|||||||
Package to test the openlp.core.ui.icons package.
|
Package to test the openlp.core.ui.icons package.
|
||||||
"""
|
"""
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from PyQt5 import QtGui
|
from PyQt5 import QtGui
|
||||||
|
|
||||||
from openlp.core.ui.icons import UiIcons
|
from openlp.core.ui.icons import UiIcons
|
||||||
|
|
||||||
|
|
||||||
@patch('openlp.core.ui.icons.UiIcons.__init__', return_value=None)
|
|
||||||
def test_simple_icon(settings):
|
def test_simple_icon(settings):
|
||||||
# GIVEN: an basic set of icons
|
# GIVEN: an basic set of icons
|
||||||
icons = UiIcons()
|
with patch('openlp.core.ui.icons.UiIcons.__init__', return_value=None):
|
||||||
icon_list = {
|
icons = UiIcons()
|
||||||
'active': {'icon': 'fa.child'}
|
icon_list = {
|
||||||
|
'active': {'icon': 'fa.child'}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
icons.load_icons(icon_list)
|
||||||
|
# WHEN: I use the icons
|
||||||
icons.load_icons(icon_list)
|
icon_active = UiIcons().active
|
||||||
# WHEN: I use the icons
|
# THEN: I should have an icon
|
||||||
icon_active = UiIcons().active
|
assert isinstance(icon_active, QtGui.QIcon)
|
||||||
# THEN: I should have an icon
|
|
||||||
assert isinstance(icon_active, QtGui.QIcon)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user