diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 879885a..91bf187 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -24,4 +24,4 @@ jobs: - name: Install pre-commit run: poetry install - name: Run pre-commit - run: pre-commit run --all-files + run: poetry run pre-commit run --all-files diff --git a/tests/test_spec.py b/tests/test_spec.py index 9c42197..940867a 100644 --- a/tests/test_spec.py +++ b/tests/test_spec.py @@ -70,49 +70,3 @@ class TestLLMSpec: ) with pytest.raises(ValueError, match="An image is required for this request."): spec.validate(prompt="", encoded_image="", encoded_audio="", files={}) - - @pytest.mark.asyncio - async def test_probe_sends_request(self, httpx_mock): - httpx_mock.add_response( - method="POST", url="http://example.com", status_code=200 - ) - spec = LLMSpec( - method="POST", - url="http://example.com", - headers={}, - body='{"prompt": "<>"}', - ) - response = await spec.probe(prompt="test") - assert response.status_code == 200 - - @pytest.mark.asyncio - async def test_probe_with_files(self, httpx_mock): - httpx_mock.add_response( - method="POST", url="http://example.com", status_code=200 - ) - spec = LLMSpec( - method="POST", - url="http://example.com", - headers={"Content-Type": "multipart/form-data"}, - body='{"prompt": "<>"}', - has_files=True, - ) - files = {"file": ("filename.txt", "file content")} - response = await spec.probe(prompt="test", files=files) - assert response.status_code == 200 - - @pytest.mark.asyncio - async def test_probe_with_image(self, httpx_mock): - httpx_mock.add_response( - method="POST", url="http://example.com", status_code=200 - ) - spec = LLMSpec( - method="POST", - url="http://example.com", - headers={}, - body='{"image": "<>"}', - has_image=True, - ) - encoded_image = "base64encodedstring" - response = await spec.probe(prompt="test", encoded_image=encoded_image) - assert response.status_code == 200