MCPcopy Create free account
hub / github.com/ScalingIntelligence/tokasaurus / test_files

Function test_files

tests/test_basic.py:195–206  ·  view source on GitHub ↗
(client: OpenAI)

Source from the content-addressed store, hash-verified

193
194
195def test_files(client: OpenAI):
196 content = """{"a": 1, "b": 2}\n{"a": 3, "b": 4}"""
197 with tempfile.NamedTemporaryFile(delete=True, suffix=".jsonl") as f:
198 f.write(content.encode("utf-8"))
199
200 f.flush()
201 f.seek(0)
202
203 file_obj = client.files.create(file=open(f.name, "rb"), purpose="batch")
204
205 retrieved_content = client.files.content(file_obj.id).content.decode("utf-8")
206 assert retrieved_content == content
207
208
209def test_batch_chat_completions(client: OpenAI):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected