def test_delete_from_redis(docker_redis): os.environ["REDIS_ENABLED_FOR_DYNACONF"] = "1" os.environ["REDIS_HOST_FOR_DYNACONF"] = "localhost" os.environ["REDIS_PORT_FOR_DYNACONF"] = "6379" settings = LazySettings(environments=True) write(settings, {"OTHER_SECRET": "redis_works"}) load(settings) assert settings.get("OTHER_SECRET") == "redis_works" delete(settings, key="OTHER_SECRET") assert load(settings, key="OTHER_SECRET") is None
def test_delete_all_from_redis(docker_redis): settings = LazySettings(environments=True) delete(settings) assert load(settings, key="OTHER_SECRET") is None