tests/conftest.py
685 B · 27 lines · python Raw
1 """Pytest fixtures for pqc-agent-wallet."""
2
3 from __future__ import annotations
4
5 import pytest
6 from quantumshield.identity.agent import AgentIdentity
7
8 from pqc_agent_wallet import Wallet
9
10
11 @pytest.fixture
12 def owner() -> AgentIdentity:
13 return AgentIdentity.create("test-agent")
14
15
16 @pytest.fixture
17 def wallet_path(tmp_path) -> str:
18 return str(tmp_path / "agent.wallet")
19
20
21 @pytest.fixture
22 def open_wallet(wallet_path, owner) -> Wallet:
23 w = Wallet.create_with_passphrase(wallet_path, "correct-horse-battery", owner)
24 w.put("openai_api_key", "sk-test-openai", service="openai")
25 w.put("postgres_password", "db-pass-123", service="postgres", scheme="password")
26 return w
27