-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support testing migrations in tests #593
Comments
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 👋 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 haven't seen this project, but it's almost identical, so we can use it if you guys prefer 👍 |
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. |
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.raises
settings.MIGRATION_MODULES
for a migration testThis ticket is mainly for discussing better ways of testing django data migrations in pytest.
The text was updated successfully, but these errors were encountered: