-
Notifications
You must be signed in to change notification settings - Fork 7
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
Handling of / keeping data from migrations? #11
Comments
If we have a test case that has Let me know if this fits your use case. I'd be interested to know if there would be a useful alteration/option to add. |
What I've meant is related to data migrations in general: e.g. you are creating a user in some early migration, and then test some migrations: because of using That appears to be a general problem with data migrations in tests, where you also use See also my comment at pytest-dev/pytest-django#258 (comment), which plays with the idea of using snapshots of the database via https://github.com/fastmonkeys/stellar. |
I think - by default, at least - that it shouldn't. I'd rather that the test cases don't depend on data from earlier migrations. If there's an alteration to the |
Sorry for my ignorance, but does this handle / keep / restore data being created during migrations?
The typical problem is that Django's
flush
(called withTransactionTestcase
) will empty the tables, but keeps their structure migrated (see pytest-dev/pytest-django#220 (comment) for more information / discussion in this regard), and migrations won't be run again (themigrations
table/info is kept).The text was updated successfully, but these errors were encountered: