feat(gateway): 接入接口22与账号鉴权测试页
This commit is contained in:
@@ -14,7 +14,7 @@ LOGIN = "/api/v1/auth/login"
|
||||
REFRESH = "/api/v1/auth/refresh"
|
||||
FEATURES_42 = "/api/v1/face/features-42"
|
||||
CHECK = "/api/v1/auth/check"
|
||||
PROTECTED = [FEATURES_42, "/api/v1/hairline/generate-52", "/api/v1/face/b-end-points"]
|
||||
PROTECTED = [FEATURES_42, "/api/v1/hairline/generate-52", "/api/v1/face/b-end-points", "/api/v1/hair/grow-22"]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -33,7 +33,7 @@ def login(client):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path", PROTECTED)
|
||||
def test_all_three_routes_reject_missing_static_and_refresh_tokens(client, monkeypatch, path):
|
||||
def test_protected_routes_reject_missing_static_and_refresh_tokens(client, monkeypatch, path):
|
||||
proxy = AsyncMock()
|
||||
features = AsyncMock()
|
||||
monkeypatch.setattr(gateway, "_proxy", proxy)
|
||||
@@ -99,7 +99,7 @@ def test_features42_combines_processed_photo_with_main_features(client, monkeypa
|
||||
analyzer.assert_called_once_with(b"processed", None, accept_age_alias=True)
|
||||
|
||||
|
||||
def test_bearer_requirement_is_scoped_to_three_business_routes_and_check(client):
|
||||
def test_bearer_requirement_is_scoped_to_protected_business_routes_and_check(client):
|
||||
schema = client.get("/openapi.json").json()
|
||||
protected = {
|
||||
path
|
||||
|
||||
Reference in New Issue
Block a user