コード例 #1
0
ファイル: offeringcmd.py プロジェクト: jonathanj/mantissa
 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
ファイル: offeringcmd.py プロジェクト: fusionapp/mantissa
 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
ファイル: webtheme.py プロジェクト: jonathanj/mantissa
 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
ファイル: test_offering.py プロジェクト: fusionapp/mantissa
 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
ファイル: test_offering.py プロジェクト: jonathanj/mantissa
 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
ファイル: offeringcmd.py プロジェクト: jonathanj/mantissa
 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
ファイル: test_signup.py プロジェクト: pombredanne/quotient
def getQuotientOffering():
    for off in offering.getOfferings():
        if off.name == 'Quotient':
            return off
コード例 #9
0
ファイル: offeringcmd.py プロジェクト: fusionapp/mantissa
 def postOptions(self):
     for o in offering.getOfferings():
         print "%s: %s" % (o.name, o.description)