recovery tests: do them on a new tenant

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt 2024-01-12 02:33:55 +01:00
parent 963d452659
commit 687a7e0c16
No known key found for this signature in database
GPG Key ID: 9C3FA22FABF1AA8D
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,6 @@
from json import loads
from django.urls import reverse
from django_tenants.utils import get_public_schema_name
from authentik.core.models import Token, TokenIntents, User
from authentik.lib.config import CONFIG
@ -19,7 +18,10 @@ class TestAPI(TenantAPITestCase):
def setUp(self):
super().setUp()
self.tenant = Tenant.objects.get(schema_name=get_public_schema_name())
self.tenant = Tenant.objects.create(
name=generate_id(),
schema_name="t_" + generate_id(length=63 - 2)
)
self.user: User = User.objects.create_user(username="recovery-test-user")
@CONFIG.patch("outposts.disable_embedded_outpost", True)
@ -86,3 +88,4 @@ class TestAPI(TenantAPITestCase):
headers=HEADERS,
)
self.assertEqual(response.status_code, 404)
self.assertEqual(len(Token.objects.all()), 0)

0
scripts/create_bucket.sh Normal file → Executable file
View File