Skip to content

Commit 1e4ec18

Browse files
hc-sousacursoragent
andcommitted
test(marketplace): assert bootstrap module gating
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e32ecd1 commit 1e4ec18

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/tenancy/tests/test_bootstrap.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,19 @@ def test_enabled_modules_omits_trails_when_flag_false(self):
3838
island.save(update_fields=['feature_flags'])
3939
modules = enabled_modules(island)
4040
self.assertNotIn('trails', modules)
41+
42+
def test_enabled_modules_includes_marketplace_when_flag_set(self):
43+
island = get_or_create_default_island()
44+
island.feature_flags = {**island.feature_flags, 'marketplace': True, 'transit': True}
45+
island.save(update_fields=['feature_flags'])
46+
modules = enabled_modules(island)
47+
self.assertIn('marketplace', modules)
48+
49+
def test_enabled_modules_omits_marketplace_when_flag_false(self):
50+
island = get_or_create_default_island()
51+
flags = dict(island.feature_flags or {})
52+
flags['marketplace'] = False
53+
island.feature_flags = flags
54+
island.save(update_fields=['feature_flags'])
55+
modules = enabled_modules(island)
56+
self.assertNotIn('marketplace', modules)

0 commit comments

Comments
 (0)