Exemplo n.º 1
0
 def __call__(self):
     sm = zapi.getSiteManager()
     result = ('zapi.getSiteManager() is zapi.getGlobalSiteManager(): %s\n'
               'IFiveUtilityRegistry.providedBy(utility_service): %s\n'
               'isinstance(zapi.getSiteManager(), FiveSiteManager): %s' %
               (sm is zapi.getGlobalSiteManager(),
                IFiveUtilityRegistry.providedBy(
                    sm.utilities), isinstance(sm, FiveSiteManager)))
     return result
Exemplo n.º 2
0
 def __call__(self):
     sm = zapi.getSiteManager()
     result = ('zapi.getSiteManager() is zapi.getGlobalSiteManager(): %s\n'
               'IFiveUtilityRegistry.providedBy(utility_service): %s\n'
               'isinstance(zapi.getSiteManager(), FiveSiteManager): %s'
               % (sm is zapi.getGlobalSiteManager(),
                  IFiveUtilityRegistry.providedBy(sm.utilities),
                  isinstance(sm, FiveSiteManager)))
     return result
Exemplo n.º 3
0
 def __call__(self):
     sm = zapi.getSiteManager()
     result = {
         'zapi.getSiteManager() is zapi.getGlobalSiteManager()':
         sm is zapi.getGlobalSiteManager(),
         'IFiveUtilityRegistry.providedBy(utility_service)':
         IFiveUtilityRegistry.providedBy(sm.utilities),
         'isinstance(zapi.getSiteManager(), FiveSiteManager)':
         isinstance(sm, FiveSiteManager),
     }
     return pprint.pformat(result)
Exemplo n.º 4
0
 def utilities(self):
     return IFiveUtilityRegistry(self.context)