def test_isFullWhiteProgramInActiveIfBlue100Percent(self): get_dict_value_from_JSON_webservice_mock \ = MagicMock(side_effect=generate_get_dict_value_from_JSON_webservice_return_value( dict(red=0.0, green=0.0, blue=1.0), None)) with patch('flicintegration.eventhelper.get_dict_value_from_JSON_webservice', new=get_dict_value_from_JSON_webservice_mock): self.assertFalse(isFullWhiteProgramActive())
def test_isFullWhiteProgramInActiveIfBlue100Percent(self): get_dict_value_from_JSON_webservice_mock \ = MagicMock(side_effect=generate_get_dict_value_from_JSON_webservice_return_value( dict(red=0.0, green=0.0, blue=1.0), None)) with patch( 'flicintegration.eventhelper.get_dict_value_from_JSON_webservice', new=get_dict_value_from_JSON_webservice_mock): self.assertFalse(isFullWhiteProgramActive())
def test_isFeedProgramInActiveIfColorNone(self): isColorValidMock = MagicMock() isColorValidMock.return_value = False get_dict_value_from_JSON_webservice_mock \ = MagicMock(side_effect=generate_get_dict_value_from_JSON_webservice_return_value( None, 0.5)) with patch('flicintegration.eventhelper.get_dict_value_from_JSON_webservice', new=get_dict_value_from_JSON_webservice_mock), \ patch('flicintegration.eventhelper.isColorValid', new=isColorValidMock): self.assertFalse(isFullWhiteProgramActive())
def test_isFullWhiteProgramInActiveIfColorNone(self): isColorValidMock = MagicMock() isColorValidMock.return_value = False get_dict_value_from_JSON_webservice_mock \ = MagicMock(side_effect=generate_get_dict_value_from_JSON_webservice_return_value( None, None)) with patch('flicintegration.eventhelper.get_dict_value_from_JSON_webservice', new=get_dict_value_from_JSON_webservice_mock), \ patch('flicintegration.eventhelper.isColorValid', new=isColorValidMock): self.assertFalse(isFullWhiteProgramActive())