From 61376bfa8108de481e5c4f2fa91ed1b784225291 Mon Sep 17 00:00:00 2001 From: Aidan Do Date: Tue, 10 Dec 2024 10:58:33 +0000 Subject: [PATCH] . --- .../providers/tests/memory/test_vector_store.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/llama_stack/providers/tests/memory/test_vector_store.py b/llama_stack/providers/tests/memory/test_vector_store.py index 4afd65dbf..34da76462 100644 --- a/llama_stack/providers/tests/memory/test_vector_store.py +++ b/llama_stack/providers/tests/memory/test_vector_store.py @@ -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 @@ -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, @@ -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(