def test_copy_nested_schema():
    """Test that a nested validator schema can be copied."""
    class PersonSchema(validators.Schema):
        class namefields(validators.Schema):
            firstname = validators.PlainText()
            lastname = validators.PlainText()
        class parents(validators.Schema):
            class father(validators.Schema):
                firstname = validators.PlainText()
                lastname = validators.PlainText()
            class mother(validators.Schema):
                firstname = validators.PlainText()
                lastname = validators.PlainText()
    schema = copy_schema(PersonSchema())
Пример #2
0
def test_copy_nested_schema():
    """Test that a nested validator schema can be copied."""
    class PersonSchema(validators.Schema):
        class namefields(validators.Schema):
            firstname = validators.PlainText()
            lastname = validators.PlainText()

        class parents(validators.Schema):
            class father(validators.Schema):
                firstname = validators.PlainText()
                lastname = validators.PlainText()

            class mother(validators.Schema):
                firstname = validators.PlainText()
                lastname = validators.PlainText()

    schema = copy_schema(PersonSchema())
Пример #3
0
def test_copy_schema():
    class UserSchema(validators.Schema):
        user_name = validators.PlainText()
    schema = copy_schema(UserSchema())
Пример #4
0
def test_copy_schema():
    """Test that a validator schema can be copied."""
    class UserSchema(validators.Schema):
        user_name = validators.PlainText()

    schema = copy_schema(UserSchema())
def test_copy_schema():
    """Test that a validator schema can be copied."""
    class UserSchema(validators.Schema):
        user_name = validators.PlainText()
    schema = copy_schema(UserSchema())