def postOptions(self): for o in offering.getOfferings(): if o.name == self["offering"]: offering.installOffering(self.store, o, None) break else: raise usage.UsageError("No such offering")
def _realGetAllThemes(self): """ Collect themes from all available offerings. """ l = [] for offering in getOfferings(): l.extend(offering.themes) l.sort(key=lambda o: o.priority) l.reverse() return l
def test_getOfferings(self): """ getOffering should use the Twisted plugin system to load the plugins provided with Mantissa. Since this is dynamic, we can't assert anything about the complete list, but we can at least verify that all the plugins that should be there, are. """ foundOfferings = list(offering.getOfferings()) allExpectedOfferings = [baseOffering, ampOffering, peopleOffering] for expected in allExpectedOfferings: self.assertIn(expected, foundOfferings)
def postOptions(self): for o in offering.getOfferings(): print "%s: %s" % (o.name, o.description)
def getQuotientOffering(): for off in offering.getOfferings(): if off.name == 'Quotient': return off