Description
Hi,
I am trying to use pytest
with django-tenants
which uses PostgreSQL
schemas to isolate clients. How do I configure pytest-django
so that if I am using TenantTestCase
which actually creates a test
schema along with public
starts to use both the schema's or set the database search path to 'search_path=test, public'.
It seems pytest is only using the public
schema and thus fails to find out the test
schema.
The models that I want to test gets created in test
schema, isolated from public
.
I read in the documentation that pytest-django doesn't play well with multiple databases. Is it true with multiple schema's as well which are in a single database?
The tests are running fine with manage.py test
(Django inbuilt testing) and utilizing both the schemas.
Thanks.