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:
When running
pytest --no-migrations, Models are synced to their corresponding tables as-is: no migrations are executed.django-db-viewsdoesn'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-viewscould 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-pgtriggerdoes something like that).What are your thoughts?
References: