예제 #1
0
def test_list_validation_index_on_exception():
    field = ListField(StringField())
    try:
        field.validate(FIELD_NAME, TEST_LIST_MIXED)
    except ListFieldInvalidError as e:
        assert e.index == 1
예제 #2
0
def test_list_validation_success():
    field = ListField(StringField())
    field.validate(FIELD_NAME, TEST_LIST_STRINGS)
예제 #3
0
def test_list_validation_error_type():
    field = ListField(StringField())
    field.validate(FIELD_NAME, TEST_LIST_MIXED)
예제 #4
0
def test_list_validation_success_empty():
    field = ListField(StringField())
    field.validate(FIELD_NAME, TEST_LIST_EMPTY)
예제 #5
0
def test_list_validation_index_on_exception():
    field = ListField(StringField())
    try:
        field.validate(FIELD_NAME, TEST_LIST_MIXED)
    except ListFieldInvalidError as e:
        assert e.index == 1
예제 #6
0
def test_list_validation_error_type():
    field = ListField(StringField())
    field.validate(FIELD_NAME, TEST_LIST_MIXED)
예제 #7
0
def test_list_validation_success():
    field = ListField(StringField())
    field.validate(FIELD_NAME, TEST_LIST_STRINGS)
예제 #8
0
def test_list_validation_success_empty():
    field = ListField(StringField())
    field.validate(FIELD_NAME, TEST_LIST_EMPTY)