Пример #1
0
def test_doesnt_allow_changing_schema_properties():
    schema_dict = {
        'foo': 'bar',
    }
    schema = Profile(schema_dict)
    with pytest.raises(AttributeError):
        schema.foo = 'baz'
Пример #2
0
def test_doesnt_allow_changing_schema_properties():
    schema_dict = {
        'foo': 'bar',
    }
    schema = Profile(schema_dict)
    with pytest.raises(AttributeError):
        schema.foo = 'baz'
Пример #3
0
def test_allow_changing_properties_not_in_schema():
    schema_dict = {}
    schema = Profile(schema_dict)
    schema.foo = 'bar'
    assert schema.foo == 'bar'
Пример #4
0
def test_allow_changing_properties_not_in_schema():
    schema_dict = {}
    schema = Profile(schema_dict)
    schema.foo = 'bar'
    assert schema.foo == 'bar'