Skip to content

Commit

Permalink
Merge pull request #1274 from Agenta-AI/gh/fix-failing-tests
Browse files Browse the repository at this point in the history
Update - fix failing tests
  • Loading branch information
aakrem authored Jan 25, 2024
2 parents 0091b78 + f80c134 commit 0bc9ef0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ def use_open_ai_key():

@pytest.fixture(scope="session")
def fetch_single_prompt_template(fetch_templates):
return fetch_templates[1]
return next(
(temp for temp in fetch_templates if temp["image"]["name"] == "chat_openai"),
None,
)


@pytest.fixture()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,6 @@ async def test_get_evaluator_configs():
assert type(response.json()) == list


@pytest.mark.asyncio
async def test_update_app_variant_parameters(update_app_variant_parameters):
app = await AppDB.find_one(AppDB.app_name == APP_NAME)
testset = await TestSetDB.find_one(TestSetDB.app.id == app.id)
app_variant = await AppVariantDB.find_one(
AppVariantDB.app.id == app.id, AppVariantDB.variant_name == "app.default"
)

parameters = update_app_variant_parameters
parameters["inputs"] = [{"name": list(testset.csvdata[0].keys())[0]}]
payload = {"parameters": parameters}

response = await test_client.put(
f"{BACKEND_API_HOST}/variants/{str(app_variant.id)}/parameters/", json=payload
)
assert response.status_code == 200


@pytest.mark.asyncio
async def test_create_evaluation():
# Fetch app, app_variant and testset
Expand Down

0 comments on commit 0bc9ef0

Please sign in to comment.