Ticket #8548: validate_verbose_name-8548-test.diff
File validate_verbose_name-8548-test.diff, 1.5 KB (added by , 16 years ago) |
---|
-
tests/modeltests/invalid_models/models.py
181 181 """ Model to test for unique ManyToManyFields, which are invalid. """ 182 182 unique_people = models.ManyToManyField( Person, unique=True ) 183 183 184 class VerboseNameTooLong(models.Model): 185 """ Model to test for verbose_name with invalid lenghts """ 186 name = models.CharField(max_length=10) 187 188 class Meta: 189 verbose_name = 'Lorem ipsum dolor sit amet, consectetur cras amet.' 190 184 191 model_errors = """invalid_models.fielderrors: "charfield": CharFields require a "max_length" attribute. 185 192 invalid_models.fielderrors: "decimalfield": DecimalFields require a "decimal_places" attribute. 186 193 invalid_models.fielderrors: "decimalfield": DecimalFields require a "max_digits" attribute. … … 276 283 invalid_models.abstractrelationmodel: 'fk1' has a relation with model AbstractModel, which has either not been installed or is abstract. 277 284 invalid_models.abstractrelationmodel: 'fk2' has an m2m relation with model AbstractModel, which has either not been installed or is abstract. 278 285 invalid_models.uniquem2m: ManyToManyFields cannot be unique. Remove the unique argument on 'unique_people'. 286 invalid_models.verbosenametoolong: verbose_name "Lorem ipsum dolor sit amet, consectetur..." is too long. It must be 39 characters long at most. 279 287 """