Skip to main content

Patch Launch Darkly feature flags for unit testing

Project description

LD Feature Patch

https://img.shields.io/pypi/v/ld_patch.svg https://img.shields.io/travis/pymetrics/ld-feature-patch.svg 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.

History

1.0.0 (2024-01-12)

  • Drop support for Python 3.6. Add Python 3.10 - 3.12.

0.1.0 (2021-01-11)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ld-feature-patch-1.0.0.tar.gz (11.3 kB view hashes)

Uploaded Source

Built Distribution

ld_feature_patch-1.0.0-py2.py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page