Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: skip tests if ZEN_API_KEY is not set #17143

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ version = "0.3.0"

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
zenguard = "^0.1.13"
zenguard = "^0.2.1"
llama-index-core = "^0.12.0"

[tool.poetry.group.dev.dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import pytest

import os
from typing import Dict

import pytest
from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.zenguard import (
ZenGuardPack,
ZenGuardConfig,
Credentials,
Detector,
ZenGuardConfig,
ZenGuardPack,
)

pytestmark = pytest.mark.skipif(
os.environ.get("ZEN_API_KEY") is None, reason="ZEN_API_KEY not set"
)


@pytest.fixture()
def zenguard_pack():
api_key = "3Ev_DGvELv7EnlgWMTlpmWTo82tpstyz4Li_R7kTDQw" # mock key. whitelisted only for LlamaIndex tests.
api_key = os.environ.get("ZEN_API_KEY")
config = ZenGuardConfig(credentials=Credentials(api_key=api_key))
return ZenGuardPack(config)

Expand Down
Loading