mirror of
https://github.com/hoshikawa2/agent_platform_oci.git
synced 2026-09-07 18:23:46 +00:00
Disclaimer best practicies Oracle for Security
This commit is contained in:
44
tests/unit/test_long_term_memory_autonomous.py
Normal file
44
tests/unit/test_long_term_memory_autonomous.py
Normal file
@@ -0,0 +1,44 @@
|
||||
from types import SimpleNamespace
|
||||
|
||||
from agent_framework.memory.long_term_store import (
|
||||
InMemoryLongTermMemoryStore,
|
||||
OracleAutonomousLongTermMemoryStore,
|
||||
SQLiteLongTermMemoryStore,
|
||||
create_long_term_memory_store,
|
||||
)
|
||||
|
||||
|
||||
def settings(provider: str):
|
||||
return SimpleNamespace(
|
||||
LONG_TERM_MEMORY_PROVIDER=provider,
|
||||
LONG_TERM_MEMORY_SQLITE_PATH=":memory:",
|
||||
LONG_TERM_MEMORY_TABLE="agentfw_long_term_memory",
|
||||
LONG_TERM_MEMORY_ORACLE_TABLE=None,
|
||||
ADB_USER="user",
|
||||
ADB_PASSWORD="password",
|
||||
ADB_DSN="service_high",
|
||||
ADB_WALLET_LOCATION=None,
|
||||
ADB_WALLET_PASSWORD=None,
|
||||
ADB_TABLE_PREFIX="AGENTFW",
|
||||
)
|
||||
|
||||
|
||||
def test_factory_memory():
|
||||
assert isinstance(create_long_term_memory_store(settings("memory")), InMemoryLongTermMemoryStore)
|
||||
|
||||
|
||||
def test_factory_sqlite():
|
||||
assert isinstance(create_long_term_memory_store(settings("sqlite")), SQLiteLongTermMemoryStore)
|
||||
|
||||
|
||||
def test_factory_autonomous():
|
||||
store = create_long_term_memory_store(settings("autonomous"))
|
||||
assert isinstance(store, OracleAutonomousLongTermMemoryStore)
|
||||
assert store.table == "AGENTFW_LONG_TERM_MEMORY"
|
||||
|
||||
|
||||
def test_factory_oracle_alias():
|
||||
assert isinstance(
|
||||
create_long_term_memory_store(settings("oracle")),
|
||||
OracleAutonomousLongTermMemoryStore,
|
||||
)
|
||||
Reference in New Issue
Block a user