def test_object_from_dict_with_defaults(self): schema = Schema.from_dict(self.object_dict, inclusion='automatic') self.assertEquals('whatever', schema.inclusion, msg='The schema value should override the default') self.assertEquals('automatic', schema.properties['a_string'].inclusion) self.assertEquals('automatic', schema.properties['an_array'].items.inclusion)
def test_object_from_dict(self): self.assertEquals(self.object_obj, Schema.from_dict(self.object_dict))
def test_integer_from_dict(self): self.assertEquals(self.integer_obj, Schema.from_dict(self.integer_dict))
def test_array_from_dict(self): self.assertEquals(self.array_obj, Schema.from_dict(self.array_dict))
def test_string_from_dict(self): self.assertEquals(self.string_obj, Schema.from_dict(self.string_dict))