recovery tests: do them on a new tenant
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
parent
963d452659
commit
687a7e0c16
|
@ -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
0
scripts/create_bucket.sh
Normal file → Executable file
Reference in a new issue