Skip to content

Commit

Permalink
Testing with custom index name
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza committed Sep 25, 2024
1 parent 2996753 commit 96e18c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pathlib import Path
from typing import Any, cast
from unittest.mock import patch
from uuid import uuid4

import ldp.agent
import pytest
Expand Down Expand Up @@ -38,7 +39,11 @@

@pytest.mark.asyncio
async def test_get_directory_index(agent_test_settings: Settings) -> None:
index = await get_directory_index(settings=agent_test_settings)
index_name = f"stub{uuid4()}" # Unique across tests
index = await get_directory_index(
index_name=index_name, settings=agent_test_settings
)
assert index.index_name == index_name, "Index name should match its specification"
assert index.fields == [
"file_location",
"body",
Expand Down

0 comments on commit 96e18c9

Please sign in to comment.