Test params (#789)
This commit is contained in:
parent
6476799b11
commit
d4e0fc69fd
|
@ -15,12 +15,20 @@ def no_feature_flags(app: Flask, with_db_and_bpmn_file_cleanup: None) -> Generat
|
|||
class TestFeatureFlagService(BaseTest):
|
||||
"""Tests the FeatureFlagService."""
|
||||
|
||||
def test_default_enabled_is_respected_when_no_feature_flag_exists(
|
||||
@pytest.mark.parametrize(
|
||||
"default_enabled,expected",
|
||||
[
|
||||
pytest.param(True, True),
|
||||
pytest.param(False, False),
|
||||
],
|
||||
)
|
||||
def test_default_enabled_v0(
|
||||
self,
|
||||
no_feature_flags: None,
|
||||
default_enabled: bool,
|
||||
expected: bool,
|
||||
) -> None:
|
||||
assert FeatureFlagService.feature_enabled("some_feature", True)
|
||||
assert not FeatureFlagService.feature_enabled("another_feature", False)
|
||||
assert FeatureFlagService.feature_enabled("some_feature", default_enabled) == expected
|
||||
|
||||
def test_default_feature_flag_value_overrides_passed_in_default_enabled(
|
||||
self,
|
||||
|
|
Loading…
Reference in New Issue