Skip to content

Commit f593bda

Browse files
committed
minor
1 parent 29aeace commit f593bda

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

services/web/server/tests/unit/with_dbs/02/test_projects_states_handlers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ async def test_open_project(
496496
assert client.app
497497

498498
# Only create socketio connection for non-anonymous users
499+
client_id = None
499500
if expected != status.HTTP_401_UNAUTHORIZED:
500501
_, client_id, _ = await create_socketio_connection_with_handlers(client)
501502

@@ -737,8 +738,9 @@ async def test_open_template_project_for_edition_with_missing_write_rights(
737738
)
738739

739740
# Only create socketio connection for non-anonymous users
741+
client_id = None
740742
if expected != status.HTTP_401_UNAUTHORIZED:
741-
_, client_id_, _ = await create_socketio_connection_with_handlers(client)
743+
_, client_id, _ = await create_socketio_connection_with_handlers(client)
742744
url = client.app.router["open_project"].url_for(project_id=template_project["uuid"])
743745
resp = await client.post(f"{url}", json=client_id)
744746
await assert_status(resp, expected)
@@ -1524,7 +1526,7 @@ async def test_open_shared_project_multiple_users(
15241526
[opened_project_state]
15251527
* 1, # NOTE: only one call per user since they are part of the everyone group
15261528
)
1527-
for user_j, client_j, _, sio_j, sio_j_handlers in other_users:
1529+
for _user_j, client_j, _, _sio_j, sio_j_handlers in other_users:
15281530
# check already opened by other users which should also notify
15291531
await _assert_project_state_updated(
15301532
sio_j_handlers[SOCKET_IO_PROJECT_UPDATED_EVENT],
@@ -1595,7 +1597,7 @@ async def test_open_shared_project_multiple_users(
15951597
[opened_project_state] * 2,
15961598
)
15971599
# check all the other users
1598-
for user_i, client_i, _, sio_i, sio_i_handlers in other_users:
1600+
for _user_i, client_i, _, _sio_i, sio_i_handlers in other_users:
15991601
await _assert_project_state_updated(
16001602
sio_i_handlers[SOCKET_IO_PROJECT_UPDATED_EVENT],
16011603
shared_project,

services/web/server/tests/unit/with_dbs/04/garbage_collector/test_resource_manager_user_sessions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ async def test_redis_registry(
149149
}
150150
assert not await redis_registry.get_resources(invalid_user_session)
151151
# find them
152+
assert await redis_registry.find_keys([]) == []
152153
for res in resources:
153154
assert await redis_registry.find_resources(user_session, res[0]) == [res[1]]
154155
assert not await redis_registry.find_resources(invalid_user_session, res[0])

0 commit comments

Comments
 (0)