This commit is contained in:
Samuel Mehrbrodt 2014-05-07 14:07:13 +02:00
parent 13d9e77c08
commit cca1ce57f3

View File

@ -146,6 +146,20 @@ class TestUi(TestCase):
self.assertEqual('combo1', combo.objectName())
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):
"""
Test creating an action