forked from openlp/openlp
Add test
This commit is contained in:
parent
13d9e77c08
commit
cca1ce57f3
@ -146,6 +146,20 @@ class TestUi(TestCase):
|
|||||||
self.assertEqual('combo1', combo.objectName())
|
self.assertEqual('combo1', combo.objectName())
|
||||||
self.assertEqual(QtGui.QComboBox.AdjustToMinimumContentsLength, combo.sizeAdjustPolicy())
|
self.assertEqual(QtGui.QComboBox.AdjustToMinimumContentsLength, combo.sizeAdjustPolicy())
|
||||||
|
|
||||||
|
def test_create_widget_action(self):
|
||||||
|
"""
|
||||||
|
Test creating an action for a widget
|
||||||
|
"""
|
||||||
|
# GIVEN: A button
|
||||||
|
button = QtGui.QPushButton()
|
||||||
|
|
||||||
|
# WHEN: We call the function
|
||||||
|
action = create_widget_action(button, 'some action')
|
||||||
|
|
||||||
|
# THEN: The action should be returned
|
||||||
|
self.assertIsInstance(action, QtGui.QAction)
|
||||||
|
self.assertEqual(action.objectName(), 'some action')
|
||||||
|
|
||||||
def test_create_action(self):
|
def test_create_action(self):
|
||||||
"""
|
"""
|
||||||
Test creating an action
|
Test creating an action
|
||||||
|
Loading…
Reference in New Issue
Block a user