Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Jun 6, 2023
1 parent 0c42faf commit 150a387
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from pathlib import Path

import pytest
Expand Down
9 changes: 3 additions & 6 deletions tests/unit/test_make_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from autogpt.app import list_agents, start_agent
from autogpt.config import Config


def test_make_agent(config: Config, mocker: MockerFixture) -> None:
"""Test that an agent can be created"""
mock = mocker.patch("openai.ChatCompletion.create")
Expand All @@ -15,13 +16,9 @@ def test_make_agent(config: Config, mocker: MockerFixture) -> None:
response.usage.prompt_tokens = 1
response.usage.completion_tokens = 1
mock.return_value = response
start_agent(
"Test Agent", "chat", "Hello, how are you?", config, "gpt-3.5-turbo"
)
start_agent("Test Agent", "chat", "Hello, how are you?", config, "gpt-3.5-turbo")
agents = list_agents(config)
assert "List of agents:\n0: chat" == agents
start_agent(
"Test Agent 2", "write", "Hello, how are you?", config, "gpt-3.5-turbo"
)
start_agent("Test Agent 2", "write", "Hello, how are you?", config, "gpt-3.5-turbo")
agents = list_agents(config)
assert "List of agents:\n0: chat\n1: write" == agents

0 comments on commit 150a387

Please sign in to comment.