Skip to content

Commit 14eefb7

Browse files
committed
fix(clean up):
1 parent 7a9c884 commit 14eefb7

File tree

2 files changed

+1
-47
lines changed

2 files changed

+1
-47
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
- name: Install pre-commit
2525
run: poetry install
2626
- name: Run pre-commit
27-
run: pre-commit run --all-files
27+
run: poetry run pre-commit run --all-files

tests/test_spec.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -70,49 +70,3 @@ def test_validate_raises_error_for_missing_image(self):
7070
)
7171
with pytest.raises(ValueError, match="An image is required for this request."):
7272
spec.validate(prompt="", encoded_image="", encoded_audio="", files={})
73-
74-
@pytest.mark.asyncio
75-
async def test_probe_sends_request(self, httpx_mock):
76-
httpx_mock.add_response(
77-
method="POST", url="http://example.com", status_code=200
78-
)
79-
spec = LLMSpec(
80-
method="POST",
81-
url="http://example.com",
82-
headers={},
83-
body='{"prompt": "<<PROMPT>>"}',
84-
)
85-
response = await spec.probe(prompt="test")
86-
assert response.status_code == 200
87-
88-
@pytest.mark.asyncio
89-
async def test_probe_with_files(self, httpx_mock):
90-
httpx_mock.add_response(
91-
method="POST", url="http://example.com", status_code=200
92-
)
93-
spec = LLMSpec(
94-
method="POST",
95-
url="http://example.com",
96-
headers={"Content-Type": "multipart/form-data"},
97-
body='{"prompt": "<<PROMPT>>"}',
98-
has_files=True,
99-
)
100-
files = {"file": ("filename.txt", "file content")}
101-
response = await spec.probe(prompt="test", files=files)
102-
assert response.status_code == 200
103-
104-
@pytest.mark.asyncio
105-
async def test_probe_with_image(self, httpx_mock):
106-
httpx_mock.add_response(
107-
method="POST", url="http://example.com", status_code=200
108-
)
109-
spec = LLMSpec(
110-
method="POST",
111-
url="http://example.com",
112-
headers={},
113-
body='{"image": "<<BASE64_IMAGE>>"}',
114-
has_image=True,
115-
)
116-
encoded_image = "base64encodedstring"
117-
response = await spec.probe(prompt="test", encoded_image=encoded_image)
118-
assert response.status_code == 200

0 commit comments

Comments
 (0)