Avoiding migrations, one can populate test data with a post_migrate signal handler. django.contrib.contenttypes already does this to fill the DB with content types, see https://github.com/django/django/blob/c651331b34b7c3841c126959e6e52879bc6f0834/django/contrib/contenttypes/apps.py#L18 . To do it during tests only you could have a condition to register said handler.
On 29 April 2017 at 09:39, Shai Berger <[email protected]> wrote: > On Saturday 29 April 2017 03:50:16 Tim Graham wrote: > > I would expect test data population to happen using migrations rather > than > > in the test runner. Can you elaborate on your use case and say if that > > method would be unsuitable? > > > > Apparently, many people think that migrations are the wrong tool for this > job. > > See previous discussion, which didn't seem to go anywhere: > > https://groups.google.com/d/msg/django-developers/Ln1-IqysEwE/DuyZl7QkEwAJ > > Have fun, > Shai. > -- Adam -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM3zT5h_6eLfkresqwaKr%2BbXESSaH5V5PXNikbUz3ufdtQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
