コード例 #1
0
ファイル: test_object.py プロジェクト: ralphm/txhue
 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
ファイル: test_object.py プロジェクト: ralphm/txhue
 def test_fromDictXY(self):
     result = LightState.fromDict(self.input)
     self.assertEquals(0.5, result.xy.x)
コード例 #3
0
ファイル: test_object.py プロジェクト: ralphm/txhue
 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
ファイル: test_object.py プロジェクト: ralphm/txhue
 def test_fromDict(self):
     result = LightState.fromDict(self.input)
     self.assertEquals(50000, result.hue)