newtrone / tests /unit_tests /test_configuration.py
nulltron's picture
Upload 62 files
c2df2b9 verified
Raw
History Blame Contribute Delete
587 Bytes
import os
from react_agent.context import Context
def test_context_init() -> None:
context = Context(model="openai/gpt-4o-mini")
assert context.model == "openai/gpt-4o-mini"
def test_context_init_with_env_vars() -> None:
os.environ["MODEL"] = "openai/gpt-4o-mini"
context = Context()
assert context.model == "openai/gpt-4o-mini"
def test_context_init_with_env_vars_and_passed_values() -> None:
os.environ["MODEL"] = "openai/gpt-4o-mini"
context = Context(model="openai/gpt-5o-mini")
assert context.model == "openai/gpt-5o-mini"