Skip to content

Commit 1e751ac

Browse files
add test
1 parent 0ca6baf commit 1e751ac

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

services/web/server/tests/unit/with_dbs/01/test_api_keys.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,20 @@ async def test_create_api_key(
109109
expected: HTTPStatus,
110110
):
111111
display_name = "foo"
112-
resp = await client.post("/v0/auth/api-keys", json={"displayName": display_name})
112+
resp = await client.post(
113+
"/v0/auth/api-keys",
114+
json={"displayName": display_name},
115+
headers={"X-Forwarded-Host": "osparc.io"},
116+
)
113117

114118
data, errors = await assert_status(resp, expected)
115119

116120
if not errors:
117121
assert data["displayName"] == display_name
118122
assert "apiKey" in data
119123
assert "apiSecret" in data
124+
assert "apiBaseUrl" in data
125+
assert data["apiBaseUrl"] == "https://api.osparc.io/"
120126

121127
resp = await client.get("/v0/auth/api-keys")
122128
data, _ = await assert_status(resp, expected)

0 commit comments

Comments
 (0)