Beispiel #1
0
    def zProperties(self):
        """
        A dictionary of all the zProperties associated with this device.
        In the form:
          { 'zCommandTimeOut' : 180 }

        This is on the metadata of the catalog
        """
        return getZProperties(self._context)
Beispiel #2
0
    def test_canGetGroupSpecificZProperties(self):
        """Makes sure if we override a zproperty at a level that we
        only return that specific zProperty
        """
        devices = self.dmd.Devices
        (testProperty, invariant) = getZProperties(devices).keys()[0:2]
        
        organizer = devices.createOrganizer('TestOrganizer')
        organizer._setProperty(testProperty, 'testChangedProperty')

        properties = getZProperties(organizer)
        self.assertTrue(testProperty in properties.keys() ,
                        "testProperty should be in the list because we changed it")
                
        self.assertFalse(invariant in properties.keys(),
                         "invariant should NOT be in the properties because we did not change it")
        self.assertNotEqual(devices.getProperty(testProperty), organizer.getProperty(testProperty),
                            "Organizers property should have changed")
Beispiel #3
0
    def zProperties(self):
        """
        A dictionary of all the zProperties associated with this device.
        In the form:
          { 'zCommandTimeOut' : 180 }

        This is on the metadata of the catalog
        """
        return getZProperties(self._context)
Beispiel #4
0
 def test_canGetAllZProperties(self):
     """Makes sure we are only getting the properties that are defined
     on our object
     """
     testPropertyId = self.dmd.Devices.zenPropertyIds()[0]
     properties = getZProperties(self.dmd.Devices)
     
     # test the results
     self.assertTrue(isinstance(properties, dict))
     self.assertTrue(testPropertyId in properties,
                     'testPropertyId should be a key in the returned dictionary')