Skip to content

Commit 10827f1

Browse files
hc-sousacursoragent
andcommitted
test(traffic): bootstrap module-gating coverage
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a8fcc43 commit 10827f1

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
@@ -54,3 +54,19 @@ def test_enabled_modules_omits_marketplace_when_flag_false(self):
5454
island.save(update_fields=['feature_flags'])
5555
modules = enabled_modules(island)
5656
self.assertNotIn('marketplace', modules)
57+
58+
def test_enabled_modules_includes_traffic_when_flag_set(self):
59+
island = get_or_create_default_island()
60+
island.feature_flags = {**island.feature_flags, 'traffic': True, 'transit': True}
61+
island.save(update_fields=['feature_flags'])
62+
modules = enabled_modules(island)
63+
self.assertIn('traffic', modules)
64+
65+
def test_enabled_modules_omits_traffic_when_flag_false(self):
66+
island = get_or_create_default_island()
67+
flags = dict(island.feature_flags or {})
68+
flags['traffic'] = False
69+
island.feature_flags = flags
70+
island.save(update_fields=['feature_flags'])
71+
modules = enabled_modules(island)
72+
self.assertNotIn('traffic', modules)

0 commit comments

Comments
 (0)