예제 #1
0
파일: common.py 프로젝트: apploitech/flex
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,
            )
        )
예제 #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,
            )
        )
예제 #3
0
def test_deep_equal_for_things_that_should_be_equal(left, right):
    assert deep_equal(left, right)
예제 #4
0
파일: test_utils.py 프로젝트: waltton/flex
def test_deep_equal_for_things_that_should_be_equal(left, right):
    assert deep_equal(left, right)