As in this gist: https://gist.github.com/blueyed/4fb0a807104551f103e6 , it would be great to get this as part of pytest-django, or otherwise as a separate plugin.
@TauPan 's fork of my fixture gist worked pretty good for me in latest Django: https://gist.github.com/TauPan/aec52e398d7288cb5a62895916182a9f
Some things that are broken or unsupported that would be nice to have (or at least need to be documented if we include this "as is"):
pytest.raisessettings.MIGRATION_MODULES for a migration testThis ticket is mainly for discussing better ways of testing django data migrations in pytest.
This is actually a very nice feature, that was started by @blueyed some years ago. What about trying to include this to pytest-django?
Hi :wave:
I am already working on similar package for testing Django's migrations:
https://github.com/skarzi/django-test-migrations
It's still in progress, because I am struggling with some issues, for instance this listed in issue description, but I will be really grateful for any suggestions and help from anyone
@skarzi have you seen https://pypi.org/project/django-test-migrations?
I think it has a bit more pytesty api...
It would be cool to have it as a part of standard pyetst-django imho
I haven't seen this project, but it's almost identical, so we can use it if you guys prefer :+1:
I think I'm going to switch to using django-test-migrations instead of maintaining my own migrator fixture; and thus can close this issue. Please feel free to reopen if there is more to discuss in relation to pytest-django.
Most helpful comment
Hi :wave:
I am already working on similar package for testing Django's migrations:
https://github.com/skarzi/django-test-migrations
It's still in progress, because I am struggling with some issues, for instance this listed in issue description, but I will be really grateful for any suggestions and help from anyone