コード例 #1
0
 def test_doesnt_allow_changing_schema_properties(self):
     schema_dict = {
         'foo': 'bar',
     }
     schema = Schema(schema_dict)
     with pytest.raises(AttributeError):
         schema.foo = 'baz'
コード例 #2
0
 def test_allow_changing_properties_not_in_schema(self):
     schema_dict = {}
     schema = Schema(schema_dict)
     schema.foo = 'bar'
     assert schema.foo == 'bar'