mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-07-23 17:01:08 +02:00
add context and config2
This commit is contained in:
parent
10436172ca
commit
5c1f3a4b91
8 changed files with 34 additions and 34 deletions
|
|
@ -25,6 +25,6 @@ async def test_prepare_documents():
|
|||
|
||||
await PrepareDocuments(g_context=context).run(with_messages=[msg])
|
||||
assert context.git_repo
|
||||
doc = await FileRepository.get_file(filename=REQUIREMENT_FILENAME, relative_path=DOCS_FILE_REPO)
|
||||
doc = await FileRepository(context.git_repo).get_file(filename=REQUIREMENT_FILENAME, relative_path=DOCS_FILE_REPO)
|
||||
assert doc
|
||||
assert doc.content == msg.content
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
"""
|
||||
import pytest
|
||||
|
||||
from metagpt.context import context
|
||||
from metagpt.logs import logger
|
||||
from metagpt.roles import ProductManager
|
||||
from tests.metagpt.roles.mock import MockMessages
|
||||
|
|
@ -15,7 +16,7 @@ from tests.metagpt.roles.mock import MockMessages
|
|||
@pytest.mark.asyncio
|
||||
@pytest.mark.usefixtures("llm_mock")
|
||||
async def test_product_manager():
|
||||
product_manager = ProductManager()
|
||||
product_manager = ProductManager(context=context)
|
||||
rsp = await product_manager.run(MockMessages.req)
|
||||
logger.info(rsp)
|
||||
assert len(rsp.content) > 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue