Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidando73 committed Dec 10, 2024
1 parent da035d6 commit 61376bf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions llama_stack/providers/tests/memory/test_vector_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from pathlib import Path

import pytest
from pytest_httpx import HTTPXMock

from llama_stack.apis.memory.memory import MemoryBankDocument, URL
from llama_stack.providers.utils.memory.vector_store import content_from_doc
Expand Down Expand Up @@ -50,9 +49,9 @@ async def test_returns_content_from_pdf_data_uri(self):
assert content == "Dummy PDF file"

@pytest.mark.asyncio
async def test_downloads_pdf_and_returns_content(self, httpx_mock: HTTPXMock):
url = "https://example.com/dummy.pdf"
httpx_mock.add_response(url=url, content=read_file(DUMMY_PDF_PATH))
async def test_downloads_pdf_and_returns_content(self):
# Using GitHub to host the PDF file
url = "https://raw.githubusercontent.com/meta-llama/llama-stack/da035d69cfca915318eaf485770a467ca3c2a238/llama_stack/providers/tests/memory/fixtures/dummy.pdf"
doc = MemoryBankDocument(
document_id="dummy",
content=url,
Expand All @@ -64,10 +63,10 @@ async def test_downloads_pdf_and_returns_content(self, httpx_mock: HTTPXMock):

@pytest.mark.asyncio
async def test_downloads_pdf_and_returns_content_with_url_object(
self, httpx_mock: HTTPXMock
self
):
url = "https://example.com/dummy.pdf"
httpx_mock.add_response(url=url, content=read_file(DUMMY_PDF_PATH))
# Using GitHub to host the PDF file
url = "https://raw.githubusercontent.com/meta-llama/llama-stack/da035d69cfca915318eaf485770a467ca3c2a238/llama_stack/providers/tests/memory/fixtures/dummy.pdf"
doc = MemoryBankDocument(
document_id="dummy",
content=URL(
Expand Down

0 comments on commit 61376bf

Please sign in to comment.