Skip to content

Commit 8e13332

Browse files
committed
add fixture to enable collaboration
1 parent ec133e7 commit 8e13332

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

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

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,20 @@
7676

7777

7878
@pytest.fixture
79-
def with_disabled_rtx_collaboration(
80-
app_environment: EnvVarsDict, monkeypatch: pytest.MonkeyPatch
81-
) -> EnvVarsDict:
82-
# disable the real-time collaboration settings
83-
return app_environment | setenvs_from_dict(
79+
def max_number_of_user_sessions(faker: Faker) -> int:
80+
return faker.pyint(min_value=1, max_value=5)
81+
82+
83+
@pytest.fixture
84+
def with_enabled_rtc_collaboration(
85+
app_environment: EnvVarsDict,
86+
with_dev_features_enabled: None,
87+
monkeypatch: pytest.MonkeyPatch,
88+
max_number_of_user_sessions: int,
89+
) -> None:
90+
setenvs_from_dict(
8491
monkeypatch,
85-
{
86-
"WEBSERVER_REALTIME_COLLABORATION": "null",
87-
},
92+
{"RTC_MAX_NUMBER_OF_USERS": f"{max_number_of_user_sessions}"},
8893
)
8994

9095

0 commit comments

Comments
 (0)