Example #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")
Example #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")
Example #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
Example #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)
Example #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)
Example #6
0
 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
Example #8
0
def getQuotientOffering():
    for off in offering.getOfferings():
        if off.name == 'Quotient':
            return off
Example #9
0
 def postOptions(self):
     for o in offering.getOfferings():
         print "%s: %s" % (o.name, o.description)