예제 #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)