mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-27 17:56:23 +02:00
Merge pull request #636 from Justin-ZL/main
update:tools/moderation unittest,only async
This commit is contained in:
commit
e86af605f5
1 changed files with 0 additions and 15 deletions
|
|
@ -11,21 +11,6 @@ import pytest
|
|||
from metagpt.tools.moderation import Moderation
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("content",),
|
||||
[
|
||||
[
|
||||
["I will kill you", "The weather is really nice today", "I want to hit you"],
|
||||
]
|
||||
],
|
||||
)
|
||||
def test_moderation(content):
|
||||
moderation = Moderation()
|
||||
results = moderation.moderation(content=content)
|
||||
assert isinstance(results, list)
|
||||
assert len(results) == len(content)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
("content",),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue