Skip to content

Commit d10edfb

Browse files
use list comprehension
1 parent 6852510 commit d10edfb

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

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

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,18 @@ async def fake_user_api_keys(
3232
faker: Faker,
3333
) -> AsyncIterable[list[int]]:
3434
assert client.app
35-
api_key_ids: list[int] = []
36-
37-
for _ in range(5):
38-
api_key_ids.append(
39-
await db.create(
40-
client.app,
41-
user_id=logged_user["id"],
42-
product_name=osparc_product_name,
43-
display_name=faker.pystr(),
44-
expiration=None,
45-
api_key=faker.pystr(),
46-
api_secret=faker.pystr(),
47-
)
35+
api_key_ids: list[int] = [
36+
await db.create(
37+
client.app,
38+
user_id=logged_user["id"],
39+
product_name=osparc_product_name,
40+
display_name=faker.pystr(),
41+
expiration=None,
42+
api_key=faker.pystr(),
43+
api_secret=faker.pystr(),
4844
)
45+
for _ in range(5)
46+
]
4947

5048
yield api_key_ids
5149

0 commit comments

Comments
 (0)