Skip to content

Commit

Permalink
chore: remove dummy key
Browse files Browse the repository at this point in the history
  • Loading branch information
Askir committed Dec 19, 2024
1 parent 882f91e commit 4dae567
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion projects/pgai/tests/vectorizer/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def vcr_():
def postgres_container_manager() -> (
Generator[Callable[[bool], PostgresContainer], None, None]
):
load_dotenv()
extension_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), "../../../extension/")
)
Expand All @@ -84,6 +83,7 @@ def get_container(load_openai_key: bool = True) -> PostgresContainer:
)

if load_openai_key:
load_dotenv()
openai_api_key = os.environ["OPENAI_API_KEY"]
container = container.with_env("OPENAI_API_KEY", openai_api_key)

Expand Down
9 changes: 0 additions & 9 deletions projects/pgai/tests/vectorizer/extensions/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,3 @@ def initialized_engine(
with engine.connect() as conn:
conn.execute(text("DROP SCHEMA public CASCADE; CREATE SCHEMA public;"))
conn.commit()


@pytest.fixture(autouse=True)
def set_dummy_openai_key(
monkeypatch: pytest.MonkeyPatch,
) -> Generator[None, None, None]:
"""Set a dummy OpenAI API key for testing."""
monkeypatch.setenv("OPENAI_API_KEY", "dummy_key")
yield

0 comments on commit 4dae567

Please sign in to comment.