patch email port always
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -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()
|
||||
|
@ -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")
|
||||
|
Reference in New Issue
Block a user