Пример #1
0
 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")
Пример #2
0
 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")
Пример #3
0
 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
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 def postOptions(self):
     for o in offering.getOfferings():
         print "%s: %s" % (o.name, o.description)
Пример #7
0
def getQuotientOffering():
    for off in offering.getOfferings():
        if off.name == 'Quotient':
            return off
Пример #8
0
def getQuotientOffering():
    for off in offering.getOfferings():
        if off.name == 'Quotient':
            return off
Пример #9
0
 def postOptions(self):
     for o in offering.getOfferings():
         print "%s: %s" % (o.name, o.description)