Skip to content

pymetrics/ld-feature-patch

Repository files navigation

LD Feature Patch

Documentation Status

Patch Launch Darkly feature flags for unit testing

Usage

from ld_patch import patch_feature

@patch_feature("my.flag.key", True)
def test_my_code():

    # Feature defaults to False
    show_feature = ldclient.variation(
        "my.flag.key",
        "test@example.com",
        False
    )

    # But patch_feature set it to True
    assert show_feature == True

Installation

python -m pip install ld-feature-patch

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

Patch Launch Darkly feature flags for unit testing

Resources

License

Stars

Watchers

Forks

Packages

No packages published