Beispiel #1
0
    def testPropertyItems(self):
        def validate(result):
            self.assertEquals(result['name'], "foobar")
            self.assertEquals(result['foobar'], "abcxyz")
            return result

        cfgService = ConfigurationProxy()
        prefs = MyPrefs()
        d = cfgService.getPropertyItems(prefs)
        d.addBoth(validate)
        return d
Beispiel #2
0
    def testThresholdClasses(self):
        def validate(result):
            self.assertTrue('Products.ZenModel.FooBarThreshold' in result)
            return result

        cfgService = ConfigurationProxy()
        prefs = MyPrefs()

        d = cfgService.getThresholdClasses(prefs)
        d.addBoth(validate)
        return d
Beispiel #3
0
    def testThresholdClasses(self):
        def validate(result):
            self.assertTrue('Products.ZenModel.FooBarThreshold' in result)
            return result

        cfgService = ConfigurationProxy()
        prefs = MyPrefs()

        d = cfgService.getThresholdClasses(prefs)
        d.addBoth(validate)
        return d
Beispiel #4
0
    def testPropertyItems(self):
        def validate(result):
            self.assertEquals(result['name'], "foobar")
            self.assertEquals(result['foobar'], "abcxyz")
            return result

        cfgService = ConfigurationProxy()
        prefs = MyPrefs()
        d = cfgService.getPropertyItems(prefs)
        d.addBoth(validate)
        return d
Beispiel #5
0
    def testThresholds(self):
        def validate(result):
            self.assertTrue('yabba dabba do' in result)
            self.assertTrue('ho ho hum' in result)
            return result

        cfgService = ConfigurationProxy()
        prefs = MyPrefs()

        d = cfgService.getThresholds(prefs)
        d.addBoth(validate)
        return d
Beispiel #6
0
    def testConfigProxies(self):
        def validate(result):
            self.assertTrue('hmm' in result)
            self.assertFalse('abcdef' in result)
            return result

        cfgService = ConfigurationProxy()
        prefs = MyPrefs()

        d = cfgService.getConfigProxies(prefs)
        d.addBoth(validate)
        return d
Beispiel #7
0
    def testThresholds(self):
        def validate(result):
            self.assertTrue('yabba dabba do' in result)
            self.assertTrue('ho ho hum' in result)
            return result

        cfgService = ConfigurationProxy()
        prefs = MyPrefs()

        d = cfgService.getThresholds(prefs)
        d.addBoth(validate)
        return d
Beispiel #8
0
    def testConfigProxies(self):
        def validate(result):
            self.assertTrue('hmm' in result)
            self.assertFalse('abcdef' in result)
            return result

        cfgService = ConfigurationProxy()
        prefs = MyPrefs()

        d = cfgService.getConfigProxies(prefs)
        d.addBoth(validate)
        return d
Beispiel #9
0
 def __init__(self):
     self._configProxy = ConfigurationProxy()
     self._scheduler = Scheduler()
     self._configurationLoader = ConfigurationLoaderTask