Fix debug code challenge (#4632)

This commit is contained in:
merwanehamadi
2023-06-09 08:40:06 -07:00
committed by GitHub
parent 3b0d49a3e0
commit 12ed5a957b
14 changed files with 143 additions and 104 deletions

View File

@@ -6,10 +6,11 @@ from autogpt.agent import Agent
from autogpt.commands.file_operations import read_file
from autogpt.config import Config
from tests.challenges.challenge_decorator.challenge_decorator import challenge
from tests.challenges.utils import run_interaction_loop
from tests.challenges.utils import get_workspace_path, run_interaction_loop
from tests.utils import requires_api_key
CYCLE_COUNT = 3
OUTPUT_LOCATION = "kube.yaml"
@pytest.mark.vcr
@@ -34,7 +35,7 @@ def test_kubernetes_template_challenge_a(
"""
run_interaction_loop(monkeypatch, kubernetes_agent, CYCLE_COUNT)
file_path = str(kubernetes_agent.workspace.get_path("kube.yaml"))
file_path = get_workspace_path(kubernetes_agent, OUTPUT_LOCATION)
content = read_file(file_path, config)
for word in ["apiVersion", "kind", "metadata", "spec"]: