def test_schemadatabag_validation_error(self): d = SchemaDataBag() d.name = 'test' d.number = 'WRONG' d.float = 2.0 with self.assertRaises(ValidationError): d.full_clean() d.number = 9 d.float = 'WRONG' with self.assertRaises(ValidationError): d.full_clean() d.float = 2.0 d.char = 'test' d.choice = 'choice1' d.full_clean() d.save()