Am Samstag, 16. Januar 2016 22:23:06 UTC+1 schrieb Vijay Khemlani:
>
> At least to me it doesn't make a lot of sense to define new models in your 
> tests, but I also don't know the particular problem you are solving.
>

I have an app, that defines a couple of *abstract models* and *mixins* in 
it's `models.py`, that are only used in other apps.

To test those abstract models and mixins I created concrete models (from 
`django.db.models.Model`), that use these abstract models and mixins, in 
`test.py`.

I created them in `test.py`, so that the test models don't get created in 
the DB outside of test running. I thought this the way to handle such 
things in Django?

At least for me this generally works fine. In a special case I get an 
`django.db.utils.ProgrammingError` from one of my test models though. To 
debug this, I wanted to take a look at the SQL Django generated for it.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/16d20af4-064a-46b7-98ae-b5a9e8105e15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to