Models only for testing purpose?
|Reported by:||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I was creating a django app and, when writing tests, I noticed there could be a better way to create models that should exist only in testing environment. That would make creating tests much easier.
One way to do it would be syncdb ignoring certain models marked for testing only. Example:
class MyModel(models.Model): ... class Meta: test_env = True # or something else