patch email port always

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-01-16 02:38:06 +01:00
parent 929e70669a
commit 60000812fd
2 changed files with 14 additions and 11 deletions

View File

@ -9,6 +9,7 @@ from django import setup as django_setup
from django.conf import settings
from django.utils.timezone import now
from authentik.lib.config import CONFIG
from authentik.lib.generators import generate_id
@ -25,16 +26,19 @@ class TestDatabaseProcess(DaphneProcess):
settings.TEST = True
from authentik.enterprise.license import LicenseKey
with patch(
"authentik.enterprise.license.LicenseKey.validate",
MagicMock(
return_value=LicenseKey(
aud="",
exp=int(mktime((now() + timedelta(days=3000)).timetuple())),
name=generate_id(),
internal_users=100,
external_users=100,
)
with (
patch(
"authentik.enterprise.license.LicenseKey.validate",
MagicMock(
return_value=LicenseKey(
aud="",
exp=int(mktime((now() + timedelta(days=3000)).timetuple())),
name=generate_id(),
internal_users=100,
external_users=100,
)
),
),
CONFIG.patch("email.port", 1025),
):
return super().run()

View File

@ -419,7 +419,6 @@ class TestSourceSAML(SeleniumTestCase):
# Wait until we're logged in
self.wait_for_url(self.if_user_url())
# sleep(999999)
self.assert_user(
User.objects.exclude(username="akadmin")
.exclude(username__startswith="ak-outpost")