mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
feat: fix unit test
This commit is contained in:
parent
f0edea65fe
commit
f651e45f53
2 changed files with 4 additions and 4 deletions
|
|
@ -14,8 +14,8 @@ from tests.metagpt.provider.mock_llm_config import mock_llm_config
|
|||
def test_config_1():
|
||||
cfg = Config.default()
|
||||
llm = cfg.get_openai_llm()
|
||||
assert llm is not None
|
||||
assert llm.api_type == LLMType.OPENAI
|
||||
if cfg.llm.api_type == LLMType.OPENAI:
|
||||
assert llm is not None
|
||||
|
||||
|
||||
def test_config_from_dict():
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ def test_context_1():
|
|||
def test_context_2():
|
||||
ctx = Context()
|
||||
llm = ctx.config.get_openai_llm()
|
||||
assert llm is not None
|
||||
assert llm.api_type == LLMType.OPENAI
|
||||
if ctx.config.llm.api_type == LLMType.OPENAI:
|
||||
assert llm is not None
|
||||
|
||||
kwargs = ctx.kwargs
|
||||
assert kwargs is not None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue