def test_base64_converter_to_python(url_val): assert base64_to_uuid(url_val) == UUID(int=1)
def test_base64_converter_to_python_raises_validation_error(url_val): with pytest.raises(Exception): base64_to_uuid(url_val)
def to_python(self, value): try: return base64_to_uuid(value) except ValueError: raise ValidationError()