diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_public_groups_toggle.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_public_groups_toggle.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/meshbay-hub/tests/test_public_groups_toggle.py b/packages/meshbay-hub/tests/test_public_groups_toggle.py index e52fa85..2a57429 100644 --- a/packages/meshbay-hub/tests/test_public_groups_toggle.py +++ b/packages/meshbay-hub/tests/test_public_groups_toggle.py @@ -228,7 +228,18 @@ def _mhp_token(hub_id): @pytest.mark.asyncio -async def test_disabled_empties_the_federation_export(client): +async def test_disabled_empties_the_federation_export(client, monkeypatch): + """What the export advertises, for the day federation re-opens. + + MHP is switched off in the code and every route answers 503 + (`federation.FEDERATION_ENABLED`, §7.6), so this opens the gate for its own + duration. The subject is the public-groups switch, not federation: with + public groups off, the export must advertise nothing, and that has to stay + true whether the door is open today or not. + """ + from meshbay_hub.api import federation + monkeypatch.setattr(federation, "FEDERATION_ENABLED", True) + admin = await _admin(client) owner = await _user(client, "ivan") await _create_public(client, owner, "exported-square") |