mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-15 11:02:36 +02:00
add test config
This commit is contained in:
parent
8ddd17da28
commit
0f0ef86b26
2 changed files with 13 additions and 1 deletions
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
from metagpt.config2 import Config, config
|
||||
from metagpt.configs.llm_config import LLMType
|
||||
from tests.metagpt.provider.mock_llm_config import mock_llm_config
|
||||
|
||||
|
||||
def test_config_1():
|
||||
|
|
@ -19,3 +20,9 @@ def test_config_1():
|
|||
|
||||
def test_config_2():
|
||||
assert config == Config.default()
|
||||
|
||||
|
||||
def test_config_from_dict():
|
||||
cfg = Config(llm={"default": mock_llm_config})
|
||||
assert cfg
|
||||
assert cfg.llm["default"].api_key == "mock_api_key"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue