Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
e9e1715b
Commit
e9e1715b
authored
5 years ago
by
Adam Butterworth
Browse files
Options
Downloads
Patches
Plain Diff
Update test_flags.py
parent
2459382f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/experiments/tests/test_flags.py
+3
-3
3 additions, 3 deletions
lms/djangoapps/experiments/tests/test_flags.py
with
3 additions
and
3 deletions
lms/djangoapps/experiments/tests/test_flags.py
+
3
−
3
View file @
e9e1715b
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment