Skip to content
Snippets Groups Projects
Commit e9e1715b authored by Adam Butterworth's avatar Adam Butterworth
Browse files

Update test_flags.py

parent 2459382f
No related branches found
No related tags found
No related merge requests found
......@@ -102,11 +102,10 @@ class ExperimentWaffleFlagTests(SharedModuleStoreTestCase):
(False, 1),
)
@ddt.unpack
def test_bucket_override(self, active, expected_bucket):
def test_forcing_bucket(self, active, expected_bucket):
bucket_flag = CourseWaffleFlag('experiments', 'test.0')
with bucket_flag.override(active=active):
self.assertEqual(self.flag.get_bucket(), expected_bucket)
self.assertEqual(self.flag.is_experiment_on(), active)
self.assertEqual(self.get_bucket(), expected_bucket)
def test_tracking(self):
# Run twice, with same request
......@@ -152,6 +151,7 @@ class ExperimentWaffleFlagTests(SharedModuleStoreTestCase):
(False, 0, 0),
)
@ddt.unpack
# Test the override method
def test_override_method(self, active, bucket_override, expected_bucket):
with self.flag.override(active=active, bucket=bucket_override):
self.assertEqual(self.flag.get_bucket(), expected_bucket)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment