Пример #1
0
 def test_fromDictStringNone(self):
     """
     A string field not using L{txhue.object.stringToNone} is not C{None}.
     """
     self.input['colormode'] = 'none'
     result = LightState.fromDict(self.input)
     self.assertIsNot(None, result.colormode)
Пример #2
0
 def test_fromDictXY(self):
     result = LightState.fromDict(self.input)
     self.assertEquals(0.5, result.xy.x)
Пример #3
0
 def test_fromDictEffectNone(self):
     """
     If effect is C{'none'}, the corresponding attribute has C{None}.
     """
     result = LightState.fromDict(self.input)
     self.assertIs(None, result.effect)
Пример #4
0
 def test_fromDict(self):
     result = LightState.fromDict(self.input)
     self.assertEquals(50000, result.hue)