Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt 2024-01-12 03:56:55 +01:00
parent 0a15cf7452
commit 941b8a72aa
No known key found for this signature in database
GPG key ID: 9C3FA22FABF1AA8D
2 changed files with 2 additions and 3 deletions

View file

@ -13,6 +13,7 @@ HEADERS = {"Authorization": f"Bearer {TENANTS_API_KEY}"}
class TestSettingsAPI(TenantAPITestCase):
"""Test settings API"""
def setUp(self):
super().setUp()
self.tenant_1 = Tenant.objects.create(

View file

@ -10,9 +10,7 @@ class TenantAPITestCase(APITransactionTestCase):
for db_name in self._databases_names(include_mirrors=False):
connections[db_name].set_schema_to_public()
with connections[db_name].cursor() as cursor:
cursor.execute(
"SELECT nspname FROM pg_catalog.pg_namespace WHERE nspname ~ 't_.*'"
)
cursor.execute("SELECT nspname FROM pg_catalog.pg_namespace WHERE nspname ~ 't_.*'")
schemas = cursor.fetchall()
for row in schemas:
schema = row[0]