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)
def test_fromDictXY(self): result = LightState.fromDict(self.input) self.assertEquals(0.5, result.xy.x)
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)
def test_fromDict(self): result = LightState.fromDict(self.input) self.assertEquals(50000, result.hue)