diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 80af9da6d..92c98f59c 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -1523,6 +1523,9 @@ class ServiceManager(QtGui.QWidget): self.regenerateServiceItems() def onThemeChangeAction(self): + """ + Handles theme change events + """ theme = self.sender().objectName() # No object name means that the "Default" theme is supposed to be used. if not theme: @@ -1532,6 +1535,9 @@ class ServiceManager(QtGui.QWidget): self.regenerateServiceItems(True) def _get_parent_item_data(self, item): + """ + Finds and returns the parent item for any item + """ parent_item = item.parent() if parent_item is None: return item.data(0, QtCore.Qt.UserRole) diff --git a/tests/functional/openlp_core_lib/test_serviceitem.py b/tests/functional/openlp_core_lib/test_serviceitem.py index 39747994d..d45b253c4 100644 --- a/tests/functional/openlp_core_lib/test_serviceitem.py +++ b/tests/functional/openlp_core_lib/test_serviceitem.py @@ -206,7 +206,7 @@ class TestServiceItem(TestCase): # service_item.set_from_service(line) # THEN: We should get back a valid service item - #assert service_item.is_valid is True, u'The new service item should be valid' + assert service_item.is_valid is True, u'The new service item should be valid' #assert len(service_item._display_frames) == 0, u'The service item has no display frames' #assert len(service_item.capabilities) == 5, u'There are 5 default custom item capabilities' #assert (service_item.get_display_title()) == u'Test Custom', u'The custom title is correct' @@ -219,4 +219,4 @@ class TestServiceItem(TestCase): first_line = items[0] except: first_line = u'' - return first_line + return first_line \ No newline at end of file