File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Shared fixtures for integration tests."""
22
33from pathlib import Path
4+ from typing import Generator
45
6+ import pytest
57from fastapi import Request
6- from authentication .noop import NoopAuthDependency
78
8- from typing import Generator
9- import pytest
109from sqlalchemy import create_engine
1110from sqlalchemy .orm import sessionmaker , Session
1211from sqlalchemy .engine import Engine
1312
13+ from authentication .noop import NoopAuthDependency
14+
1415from configuration import configuration
1516from models .database .base import Base
1617
@@ -55,9 +56,7 @@ def current_config_fixture() -> Generator:
5556 This fixture loads the actual configuration file from project root (current configuration),
5657 demonstrating integration with the configuration system.
5758 """
58- config_path = (
59- Path (__file__ ).parent .parent .parent / "lightspeed-stack.yaml"
60- )
59+ config_path = Path (__file__ ).parent .parent .parent / "lightspeed-stack.yaml"
6160 assert config_path .exists (), f"Config file not found: { config_path } "
6261
6362 # Load configuration
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ async def test_config_endpoint_returns_current_config(
5353 test_auth: noop authentication tuple
5454 """
5555 response = await config_endpoint_handler (auth = test_auth , request = test_request )
56-
56+
5757 # Verify that response matches the root configuration
5858 assert response == current_config .configuration
5959
@@ -73,7 +73,7 @@ async def test_config_endpoint_fails_without_configuration(
7373 test_request: FastAPI request
7474 test_auth: noop authentication tuple
7575 """
76-
76+
7777 # Verify that LogicError is raised when authorization tries to access config
7878 with pytest .raises (LogicError ) as exc_info :
7979 await config_endpoint_handler (auth = test_auth , request = test_request )
You can’t perform that action at this time.
0 commit comments