Exemplo n.º 1
0
def validate_enum(value, options, **kwargs):
    if not any(deep_equal(value, option) for option in options):
        raise ValidationError(
            MESSAGES['enum']['invalid'].format(
                value, options,
            )
        )
Exemplo n.º 2
0
def validate_enum(value, options, **kwargs):
    if not any(deep_equal(value, option) for option in options):
        raise ValidationError(
            MESSAGES['enum']['invalid'].format(
                value, options,
            )
        )
Exemplo n.º 3
0
def test_deep_equal_for_things_that_should_be_equal(left, right):
    assert deep_equal(left, right)
Exemplo n.º 4
0
def test_deep_equal_for_things_that_should_be_equal(left, right):
    assert deep_equal(left, right)