Beispiel #1
0
 def it_can_validate_a_hex_RGB_string(self, valid_fixture):
     str_value, exception = valid_fixture
     if exception is None:
         try:
             ST_HexColorRGB.validate(str_value)
         except ValueError:
             raise AssertionError("string '%s' did not validate" % str_value)
     else:
         with pytest.raises(exception):
             ST_HexColorRGB.validate(str_value)
Beispiel #2
0
 def it_converts_RGB_string_to_upper_case(self, to_xml_fixture):
     value, expected_value = to_xml_fixture
     _value = ST_HexColorRGB.convert_to_xml(value)
     assert _value == expected_value
Beispiel #3
0
 def it_converts_RGB_string_to_upper_case(self, to_xml_fixture):
     value, expected_value = to_xml_fixture
     _value = ST_HexColorRGB.convert_to_xml(value)
     assert _value == expected_value