Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [
# Used for HTTP service base
"fastapi>=0.115.12",
"uvicorn>=0.34.3",
# Used by auth/k8s integration
# Used by authentication/k8s integration
"kubernetes>=30.1.0",
# Used to call Llama Stack APIs
"llama-stack==0.2.19",
Expand Down Expand Up @@ -58,7 +58,7 @@ exclude = [
# TODO(lucasagomes): This module was copied from road-core
# service/ols/src/auth/k8s.py and currently has 58 Pyright issues. It
# might need to be rewritten down the line.
"src/auth/k8s.py",
"src/authentication/k8s.py",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

LGTM: updated Pyright exclude path.

Change aligns with the module rename.

Run this to ensure no lingering auth imports/paths remain:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "[1/3] Python imports still using 'auth'..."
rg -nP --type=py -C2 $'^(\\s*)from\\s+auth\\b|^(\\s*)import\\s+auth(\\s|\\.|$)'

echo "[2/3] Non-import references to 'auth/<...>' (excluding authentication/authorization)..."
rg -nP -S '(?<![a-z])auth/(?!entication|orization)[^ \t"\'\)\]]+'

echo "[3/3] Package init re-exports expose get_auth_dependency..."
rg -nP --type=py -C2 '\bdef\s+get_auth_dependency\b|get_auth_dependency\s*=' src/authentication/__init__.py

Length of output: 42


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "[1/3] Python imports still using 'auth'..."
rg -nP --type=py -C2 "^(\\s*)from\\s+auth\\b|^(\\s*)import\\s+auth(\\s|\\.|$)" || true

echo "[2/3] Non-import references to 'auth/<...>' (excluding authentication/authorization)..."
rg -nP -S "(?<![a-z])auth/(?!entication|orization)[^ \t\"'\\)\\]]+" || true

echo "[3/3] Package init re-exports expose get_auth_dependency..."
if [ -f "src/authentication/__init__.py" ]; then
  rg -nP -C2 '\bdef\s+get_auth_dependency\b|get_auth_dependency\s*=' "src/authentication/__init__.py" || true
else
  echo "[3/3] src/authentication/__init__.py not found"
fi

Length of output: 377


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "[1/5] Python imports still using 'auth'..."
rg -n --type=py -C2 '^\s*(from|import)\s+auth(\b|\.)' || true

echo "[2/5] Any occurrences of 'auth.' (attribute/module usage)..."
rg -n --type=py -C2 '\bauth\.' || true

echo "[3/5] Raw 'auth/' occurrences (strings/paths) - full repo..."
rg -n -F 'auth/' -S || true

echo "[3/5] Filtered 'auth/' excluding 'authentication'/'authorization'..."
rg -n -F 'auth/' -S | rg -n -v -i 'authentication|authorization' || true

echo "[4/5] Files or directories with 'auth' in their path..."
rg --hidden --files | rg -n '/auth($|/)' || true

echo "[5/5] src/authentication/__init__.py (first 200 lines) to inspect re-exports..."
if [ -f src/authentication/__init__.py ]; then
  nl -ba src/authentication/__init__.py | sed -n '1,200p'
else
  echo "src/authentication/__init__.py not found"
fi

Length of output: 2078


Hold — update remaining auth references to authentication

Pyright exclude change aligns with the rename, but leftover references to "auth" remain — update the following:

  • pyproject.toml — comments referencing auth/k8s (lines 28, 59).
  • tests/unit/authentication/* — test docstrings reference auth/*.py: tests/unit/authentication/test_noop_with_token.py, test_noop.py, test_jwk_token.py, test_auth.py, test_k8s.py, test_utils.py.
  • src/authentication/noop_with_token.py — docstring references auth.utils.extract_user_token (also check noop.py and jwk_token.py docstrings).

No "import auth" / "from auth ..." occurrences were found.

🤖 Prompt for AI Agents
In pyproject.toml around lines 28 and 59 and in pyproject.toml line 61, update
any comment or path text that still says "auth" or "auth/k8s" to
"authentication" or "authentication/k8s" to match the rename; then update test
docstrings under tests/unit/authentication/* (test_noop_with_token.py,
test_noop.py, test_jwk_token.py, test_auth.py, test_k8s.py, test_utils.py) to
reference authentication/*.py instead of auth/*.py; also update docstrings in
src/authentication/noop_with_token.py (and verify noop.py and jwk_token.py) to
reference authentication.utils.extract_user_token (not
auth.utils.extract_user_token). Ensure only textual references are changed, not
imports.

]
extraPaths = ["./src"]

Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/authorized.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from fastapi import APIRouter, Depends

from auth.interface import AuthTuple
from auth import get_auth_dependency
from authentication.interface import AuthTuple
from authentication import get_auth_dependency
from models.responses import AuthorizedResponse, UnauthorizedResponse, ForbiddenResponse

logger = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from fastapi import APIRouter, Request, Depends

from auth.interface import AuthTuple
from auth import get_auth_dependency
from authentication.interface import AuthTuple
from authentication import get_auth_dependency
from authorization.middleware import authorize
from configuration import configuration
from models.config import Action, Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/app/endpoints/conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from client import AsyncLlamaStackClientHolder
from configuration import configuration
from app.database import get_session
from auth import get_auth_dependency
from authentication import get_auth_dependency
from authorization.middleware import authorize
from models.config import Action
from models.database.conversations import UserConversation
Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from datetime import datetime, UTC
from fastapi import APIRouter, HTTPException, Depends, Request, status

from auth import get_auth_dependency
from auth.interface import AuthTuple
from authentication import get_auth_dependency
from authentication.interface import AuthTuple
from authorization.middleware import authorize
from configuration import configuration
from models.config import Action
Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

from fastapi import APIRouter, status, Response, Depends
from client import AsyncLlamaStackClientHolder
from auth.interface import AuthTuple
from auth import get_auth_dependency
from authentication.interface import AuthTuple
from authentication import get_auth_dependency
from authorization.middleware import authorize
from models.config import Action
from models.responses import (
Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from fastapi import Depends
from llama_stack_client import APIConnectionError

from auth.interface import AuthTuple
from auth import get_auth_dependency
from authentication.interface import AuthTuple
from authentication import get_auth_dependency
from authorization.middleware import authorize
from configuration import configuration
from client import AsyncLlamaStackClientHolder
Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
CONTENT_TYPE_LATEST,
)

from auth.interface import AuthTuple
from auth import get_auth_dependency
from authentication.interface import AuthTuple
from authentication import get_auth_dependency
from authorization.middleware import authorize
from models.config import Action
from metrics.utils import setup_model_metrics
Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from fastapi.params import Depends
from llama_stack_client import APIConnectionError

from auth import get_auth_dependency
from auth.interface import AuthTuple
from authentication import get_auth_dependency
from authentication.interface import AuthTuple
from client import AsyncLlamaStackClientHolder
from configuration import configuration
from authorization.middleware import authorize
Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

from fastapi import APIRouter, HTTPException, Request, status, Depends

from auth import get_auth_dependency
from auth.interface import AuthTuple
from authentication import get_auth_dependency
from authentication.interface import AuthTuple
from client import AsyncLlamaStackClientHolder
from configuration import configuration
from app.database import get_session
Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from fastapi import APIRouter, Request, Depends
from fastapi.responses import HTMLResponse

from auth.interface import AuthTuple
from auth import get_auth_dependency
from authentication.interface import AuthTuple
from authentication import get_auth_dependency
from authorization.middleware import authorize
from models.config import Action

Expand Down
4 changes: 2 additions & 2 deletions src/app/endpoints/streaming_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from fastapi import APIRouter, HTTPException, Request, Depends, status
from fastapi.responses import StreamingResponse

from auth import get_auth_dependency
from auth.interface import AuthTuple
from authentication import get_auth_dependency
from authentication.interface import AuthTuple
from authorization.middleware import authorize
from client import AsyncLlamaStackClientHolder
from configuration import configuration
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/auth/__init__.py → src/authentication/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import logging

from auth.interface import AuthInterface
from auth import noop, noop_with_token, k8s, jwk_token
from authentication.interface import AuthInterface
from authentication import noop, noop_with_token, k8s, jwk_token
Comment on lines +5 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Rename looks good; consider relative imports + optional compatibility shim.

  • Relative imports reduce churn if the package name changes again.
  • If any out-of-tree code still imports auth.*, consider a temporary shim package to avoid breakage.

Apply this local import tweak:

-from authentication.interface import AuthInterface
-from authentication import noop, noop_with_token, k8s, jwk_token
+from .interface import AuthInterface
+from . import noop, noop_with_token, k8s, jwk_token

Optional: add a deprecation shim to keep old imports working during transition:

+// New file: src/auth/__init__.py
+import warnings, importlib, sys
+warnings.warn(
+    "Package 'auth' has been renamed to 'authentication'. Please update imports.",
+    DeprecationWarning, stacklevel=2
+)
+# Re-export submodules so auth.k8s, auth.interface, etc. continue to work.
+for _mod in ("k8s", "interface", "noop", "noop_with_token", "jwk_token"):
+    sys.modules[__name__ + "." + _mod] = importlib.import_module("authentication." + _mod)

Verify no lingering imports from the old path:


🏁 Script executed:

#!/bin/bash
# Find any remaining 'auth.' imports/usages.
rg -nP -C2 '\bfrom\s+auth(\.| \b)|\bimport\s+auth\b|\bauth\.' --glob '!**/.venv/**' --glob '!**/node_modules/**'

Length of output: 148


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Attempting robust search for 'auth' imports/usages..."

echo "1) ripgrep (unrestricted, include hidden, ignore VCS ignore):"
rg -n -uu --hidden --no-ignore-vcs -C2 \
  -e '^\s*from\s+auth\b' \
  -e '^\s*import\s+auth\b' \
  -e '\bauth\.' \
  -g '!**/node_modules/**' -g '!**/.venv/**' || echo "No matches from ripgrep (attempt 1)"

echo "2) Fallback: search tracked files (if in a git repo):"
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
  git ls-files | while IFS= read -r f; do
    rg -n -C2 -e '^\s*from\s+auth\b' -e '^\s*import\s+auth\b' -e '\bauth\.' "$f" || true
  done || true
else
  echo "Not a git repo; skipping fallback."
fi

echo "Search complete."

Length of output: 1072


Use relative imports and add a temporary auth compatibility shim — fix remaining auth. references

Search found a legacy auth. usage in noop_with_token.py; update package-local imports or add a shim to avoid breaking consumers.

Change in src/authentication/init.py (lines 5–6):

-from authentication.interface import AuthInterface
-from authentication import noop, noop_with_token, k8s, jwk_token
+from .interface import AuthInterface
+from . import noop, noop_with_token, k8s, jwk_token

Optional temporary shim (new file src/auth/init.py):

import warnings, importlib, sys
warnings.warn(
    "Package 'auth' has been renamed to 'authentication'. Update imports.",
    DeprecationWarning, stacklevel=2
)
for _mod in ("k8s", "interface", "noop", "noop_with_token", "jwk_token"):
    sys.modules[__name__ + "." + _mod] = importlib.import_module("authentication." + _mod)
🤖 Prompt for AI Agents
In src/authentication/__init__.py around lines 5 to 6, replace absolute package
imports with relative imports (e.g., from .interface import AuthInterface and
from . import noop, noop_with_token, k8s, jwk_token) so internal modules use
package-local imports, and add a temporary compatibility shim at
src/auth/__init__.py that emits a DeprecationWarning and exposes authentication
submodules under the old auth package by importing authentication.k8s,
authentication.interface, authentication.noop, authentication.noop_with_token,
and authentication.jwk_token into sys.modules for backward compatibility until
callers are updated.

from configuration import configuration
import constants

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/auth/jwk_token.py → src/authentication/jwk_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from constants import (
DEFAULT_VIRTUAL_PATH,
)
from auth.interface import NO_AUTH_TUPLE, AuthInterface, AuthTuple
from auth.utils import extract_user_token
from authentication.interface import NO_AUTH_TUPLE, AuthInterface, AuthTuple
from authentication.utils import extract_user_token
from models.config import JwkConfiguration

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/auth/k8s.py → src/authentication/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from kubernetes.config import ConfigException

from configuration import configuration
from auth.interface import AuthInterface
from authentication.interface import AuthInterface
from constants import DEFAULT_VIRTUAL_PATH

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/auth/noop.py → src/authentication/noop.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
NO_USER_TOKEN,
DEFAULT_VIRTUAL_PATH,
)
from auth.interface import AuthInterface
from authentication.interface import AuthInterface

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Intended for local/dev use only — do not use in production.

Behavior:
- Reads a user token from request headers via `auth.utils.extract_user_token`.
- Reads a user token from request headers via `authentication.utils.extract_user_token`.
- Reads `user_id` from query params (falls back to `DEFAULT_USER_UID`) and
pairs it with `DEFAULT_USER_NAME`.
- Returns a tuple: (user_id, DEFAULT_USER_NAME, user_token).
Expand All @@ -18,8 +18,8 @@
DEFAULT_USER_UID,
DEFAULT_VIRTUAL_PATH,
)
from auth.interface import AuthInterface
from auth.utils import extract_user_token
from authentication.interface import AuthInterface
from authentication.utils import extract_user_token

logger = logging.getLogger(__name__)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/authorization/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from jsonpath_ng import parse

from auth.interface import AuthTuple
from authentication.interface import AuthTuple
from models.config import JwtRoleRule, AccessRule, JsonPathOperator, Action
import constants

Expand Down
1 change: 1 addition & 0 deletions src/lightspeed_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def main() -> None:
# check if the Llama Stack version is supported by the service
asyncio.run(check_llama_stack_version(client))

# if every previous steps don't fail, start the service on specified port
start_uvicorn(configuration.service_configuration)
logger.info("Lightspeed stack finished")

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/app/endpoints/test_authorized.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from starlette.datastructures import Headers

from app.endpoints.authorized import authorized_endpoint_handler
from auth.utils import extract_user_token
from authentication.utils import extract_user_token

MOCK_AUTH = ("test-id", "test-user", True, "token")

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Unit tests for functions defined in auth/__init__.py"""
"""Unit tests for functions defined in authentication/__init__.py"""

from auth import get_auth_dependency
from auth import noop, noop_with_token, k8s
from authentication import get_auth_dependency
from authentication import noop, noop_with_token, k8s
from constants import AUTH_MOD_NOOP, AUTH_MOD_NOOP_WITH_TOKEN, AUTH_MOD_K8S
from configuration import configuration

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=redefined-outer-name

"""Unit tests for functions defined in auth/jwk_token.py"""
"""Unit tests for functions defined in authentication/jwk_token.py"""

import time

Expand All @@ -9,7 +9,7 @@
from pydantic import AnyHttpUrl
from authlib.jose import JsonWebKey, JsonWebToken

from auth.jwk_token import JwkTokenAuthDependency, _jwk_cache
from authentication.jwk_token import JwkTokenAuthDependency, _jwk_cache
from constants import DEFAULT_USER_NAME, DEFAULT_USER_UID, NO_USER_TOKEN
from models.config import JwkConfiguration, JwtConfiguration

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Unit tests for auth/k8s module."""
"""Unit tests for authentication/k8s module."""

# pylint: disable=too-many-arguments,too-many-positional-arguments,too-few-public-methods,protected-access

Expand All @@ -9,7 +9,7 @@
from kubernetes.client import AuthenticationV1Api, AuthorizationV1Api
from kubernetes.client.rest import ApiException

from auth.k8s import (
from authentication.k8s import (
K8sClientSingleton,
K8SAuthDependency,
ClusterIDUnavailableError,
Expand Down Expand Up @@ -75,8 +75,8 @@ async def test_auth_dependency_valid_token(mocker):
dependency = K8SAuthDependency()

# Mock the Kubernetes API calls
mock_authn_api = mocker.patch("auth.k8s.K8sClientSingleton.get_authn_api")
mock_authz_api = mocker.patch("auth.k8s.K8sClientSingleton.get_authz_api")
mock_authn_api = mocker.patch("authentication.k8s.K8sClientSingleton.get_authn_api")
mock_authz_api = mocker.patch("authentication.k8s.K8sClientSingleton.get_authz_api")

# Mock a successful token review response
mock_authn_api.return_value.create_token_review.return_value = MockK8sResponse(
Expand Down Expand Up @@ -108,8 +108,8 @@ async def test_auth_dependency_invalid_token(mocker):
dependency = K8SAuthDependency()

# Mock the Kubernetes API calls
mock_authn_api = mocker.patch("auth.k8s.K8sClientSingleton.get_authn_api")
mock_authz_api = mocker.patch("auth.k8s.K8sClientSingleton.get_authz_api")
mock_authn_api = mocker.patch("authentication.k8s.K8sClientSingleton.get_authn_api")
mock_authz_api = mocker.patch("authentication.k8s.K8sClientSingleton.get_authz_api")

# Setup mock responses for invalid token
mock_authn_api.return_value.create_token_review.return_value = MockK8sResponse(
Expand Down Expand Up @@ -138,7 +138,7 @@ async def test_auth_dependency_invalid_token(mocker):
async def test_cluster_id_is_used_for_kube_admin(mocker):
"""Test the cluster id is used as user_id when user is kube:admin."""
dependency = K8SAuthDependency()
mock_authz_api = mocker.patch("auth.k8s.K8sClientSingleton.get_authz_api")
mock_authz_api = mocker.patch("authentication.k8s.K8sClientSingleton.get_authz_api")
mock_authz_api.return_value.create_subject_access_review.return_value = (
MockK8sResponse(allowed=True)
)
Expand All @@ -152,7 +152,7 @@ async def test_cluster_id_is_used_for_kube_admin(mocker):
)

mocker.patch(
"auth.k8s.get_user_info",
"authentication.k8s.get_user_info",
return_value=MockK8sResponseStatus(
authenticated=True,
allowed=True,
Expand All @@ -162,7 +162,7 @@ async def test_cluster_id_is_used_for_kube_admin(mocker):
),
)
mocker.patch(
"auth.k8s.K8sClientSingleton.get_cluster_id",
"authentication.k8s.K8sClientSingleton.get_cluster_id",
return_value="some-cluster-id",
)

Expand Down Expand Up @@ -192,7 +192,7 @@ def test_auth_dependency_config(mocker):
def test_get_cluster_id(mocker):
"""Test get_cluster_id function."""
mock_get_custom_objects_api = mocker.patch(
"auth.k8s.K8sClientSingleton.get_custom_objects_api"
"authentication.k8s.K8sClientSingleton.get_custom_objects_api"
)

cluster_id = {"spec": {"clusterID": "some-cluster-id"}}
Expand Down Expand Up @@ -230,18 +230,20 @@ def test_get_cluster_id(mocker):

def test_get_cluster_id_in_cluster(mocker):
"""Test get_cluster_id function when running inside of cluster."""
mocker.patch("auth.k8s.RUNNING_IN_CLUSTER", True)
mocker.patch("auth.k8s.K8sClientSingleton.__new__")
mock_get_cluster_id = mocker.patch("auth.k8s.K8sClientSingleton._get_cluster_id")
mocker.patch("authentication.k8s.RUNNING_IN_CLUSTER", True)
mocker.patch("authentication.k8s.K8sClientSingleton.__new__")
mock_get_cluster_id = mocker.patch(
"authentication.k8s.K8sClientSingleton._get_cluster_id"
)

mock_get_cluster_id.return_value = "some-cluster-id"
assert K8sClientSingleton.get_cluster_id() == "some-cluster-id"


def test_get_cluster_id_outside_of_cluster(mocker):
"""Test get_cluster_id function when running outside of cluster."""
mocker.patch("auth.k8s.RUNNING_IN_CLUSTER", False)
mocker.patch("auth.k8s.K8sClientSingleton.__new__")
mocker.patch("authentication.k8s.RUNNING_IN_CLUSTER", False)
mocker.patch("authentication.k8s.K8sClientSingleton.__new__")

# ensure cluster_id is None to trigger the condition
K8sClientSingleton._cluster_id = None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Unit tests for functions defined in auth/noop.py"""
"""Unit tests for functions defined in authentication/noop.py"""

from fastapi import Request
from auth.noop import NoopAuthDependency
from authentication.noop import NoopAuthDependency
from constants import DEFAULT_USER_NAME, DEFAULT_USER_UID, NO_USER_TOKEN


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Unit tests for functions defined in auth/noop_with_token.py"""
"""Unit tests for functions defined in authentication/noop_with_token.py"""

from fastapi import Request, HTTPException
import pytest

from auth.noop_with_token import NoopWithTokenAuthDependency
from authentication.noop_with_token import NoopWithTokenAuthDependency
from constants import DEFAULT_USER_NAME, DEFAULT_USER_UID


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Unit tests for functions defined in auth/utils.py"""
"""Unit tests for functions defined in authentication/utils.py"""

from fastapi import HTTPException
from starlette.datastructures import Headers

from auth.utils import extract_user_token
from authentication.utils import extract_user_token


def test_extract_user_token():
Expand Down