def test_doesnt_allow_changing_schema_properties(): schema_dict = { 'foo': 'bar', } schema = Profile(schema_dict) with pytest.raises(AttributeError): schema.foo = 'baz'
def test_allow_changing_properties_not_in_schema(): schema_dict = {} schema = Profile(schema_dict) schema.foo = 'bar' assert schema.foo == 'bar'