-
Notifications
You must be signed in to change notification settings - Fork 11
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
Testing: compatibility with -no-migrations mode #24
Comments
@benjaminrigaud |
Hi, If I implement a fix, would you have time to review it? 🙇 Ben |
Hello @benjaminrigaud |
Hello, I have run into the same issue while experimenting with django-db-views on my project. @benjaminrigaud you said
would it be possible for you to share the code of your fixture ? Thanks, |
Sorry @lajus, I can't share that code from a private Repo. Some details:
|
When running
pytest --no-migrations
, Models are synced to their corresponding tables as-is: no migrations are executed.django-db-views
doesn't support this mode: the views are not created and the tests fail.As a workaround, I have implemented a fixture to be able to apply any migration on the fly.
A proper implementation in
django-db-views
could be to uncouple the SQL creating the views from the migration framework: it would permit the creation of a few helper to execute this SQL outside of the migrations (django-pgtrigger
does something like that).What are your thoughts?
References:
The text was updated successfully, but these errors were encountered: