fix(V2): hoist fastapi Request import, ripristina importlib mode
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ extend-immutable-calls = [
|
|||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
asyncio_mode = "auto"
|
asyncio_mode = "auto"
|
||||||
testpaths = ["tests"]
|
testpaths = ["tests"]
|
||||||
addopts = "--import-mode=prepend"
|
addopts = "--import-mode=importlib"
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
python_version = "3.11"
|
python_version = "3.11"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from fastapi import FastAPI
|
from fastapi import FastAPI, Request
|
||||||
from fastapi.testclient import TestClient
|
from fastapi.testclient import TestClient
|
||||||
|
|
||||||
|
|
||||||
@@ -59,7 +59,6 @@ def test_invalid_bearer_401():
|
|||||||
|
|
||||||
def test_testnet_token_sets_env_testnet():
|
def test_testnet_token_sets_env_testnet():
|
||||||
from cerbero_mcp.auth import install_auth_middleware
|
from cerbero_mcp.auth import install_auth_middleware
|
||||||
from fastapi import Request
|
|
||||||
|
|
||||||
fa = FastAPI()
|
fa = FastAPI()
|
||||||
install_auth_middleware(fa, testnet_token="tk_test", mainnet_token="tk_live")
|
install_auth_middleware(fa, testnet_token="tk_test", mainnet_token="tk_live")
|
||||||
@@ -76,7 +75,6 @@ def test_testnet_token_sets_env_testnet():
|
|||||||
|
|
||||||
def test_mainnet_token_sets_env_mainnet():
|
def test_mainnet_token_sets_env_mainnet():
|
||||||
from cerbero_mcp.auth import install_auth_middleware
|
from cerbero_mcp.auth import install_auth_middleware
|
||||||
from fastapi import Request
|
|
||||||
|
|
||||||
fa = FastAPI()
|
fa = FastAPI()
|
||||||
install_auth_middleware(fa, testnet_token="tk_test", mainnet_token="tk_live")
|
install_auth_middleware(fa, testnet_token="tk_test", mainnet_token="tk_live")
|
||||||
|
|||||||
Reference in New Issue
Block a user