From 9b270cef7928a5883e2ef75ee64bdbbbf10189db Mon Sep 17 00:00:00 2001 From: Dominic R Date: Mon, 8 Jun 2026 10:51:38 -0400 Subject: [PATCH] providers/google_workspace: avoid unused signal import Register the outgoing sync signal handlers in the signal tests without keeping an unused import binding. Agent-thread: https://sdko.org/internal/thr/ak/019ea79b-cfad-72a1-81a1-702c99d1d648 A7k-product: product A7k-product-repo: 3 Co-authored-by: Agent --- .../providers/google_workspace/tests/test_signals.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/authentik/enterprise/providers/google_workspace/tests/test_signals.py b/authentik/enterprise/providers/google_workspace/tests/test_signals.py index 662b9c5a49..aaf7a77dc9 100644 --- a/authentik/enterprise/providers/google_workspace/tests/test_signals.py +++ b/authentik/enterprise/providers/google_workspace/tests/test_signals.py @@ -1,5 +1,6 @@ """Google Workspace outgoing sync signal tests""" +from importlib import import_module from json import dumps from django.db import transaction @@ -8,9 +9,6 @@ from dramatiq.broker import get_broker from authentik.blueprints.v1.importer import Importer from authentik.core.models import Application, Group - -# Ensure the shared outgoing sync signal handlers are registered. -from authentik.enterprise.providers.google_workspace import signals as _signals # noqa: F401 from authentik.enterprise.providers.google_workspace.models import GoogleWorkspaceProvider from authentik.enterprise.providers.google_workspace.tasks import ( google_workspace_sync_direct_dispatch, @@ -18,6 +16,9 @@ from authentik.enterprise.providers.google_workspace.tasks import ( from authentik.lib.generators import generate_id from authentik.tasks.models import Task +# Ensure the shared outgoing sync signal handlers are registered. +import_module("authentik.enterprise.providers.google_workspace.signals") + class GoogleWorkspaceSignalTests(TestCase): """Test outgoing sync signal scheduling behavior."""