summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_apps_enabled_policy.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/tests/test_apps_enabled_policy.py')
-rw-r--r--packages/meshbay-node/tests/test_apps_enabled_policy.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/meshbay-node/tests/test_apps_enabled_policy.py b/packages/meshbay-node/tests/test_apps_enabled_policy.py
index ac44ab3..40c7cc8 100644
--- a/packages/meshbay-node/tests/test_apps_enabled_policy.py
+++ b/packages/meshbay-node/tests/test_apps_enabled_policy.py
@@ -123,14 +123,19 @@ async def test_the_setting_lives_on_the_node_and_survives_a_restart(tmp_path):
"absent must mean every registered app, or an upgrade hides one "
"for every existing group")
await roster.set_enabled_apps("g1", ["chat"], set_by="op")
- assert await roster.enabled_apps("g1") == ["chat"]
+ # Files comes back whatever was stored: `enabled_apps` inserts it at
+ # the front on read, and `ops.set_enabled_apps` does the same on write,
+ # because Settings is the one way back if everything else were turned
+ # off. The assertion predates that guard -- the code is right and the
+ # test was describing the older behaviour.
+ assert await roster.enabled_apps("g1") == ["files", "chat"]
finally:
await roster.close()
reopened = Roster(db_path=tmp_path / "roster.db")
await reopened.open()
try:
- assert await reopened.enabled_apps("g1") == ["chat"]
+ assert await reopened.enabled_apps("g1") == ["files", "chat"]
assert sorted(await reopened.enabled_apps("g2")) == ["chat", "files"], (
"one group's setting must not answer for another")
finally: