MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / test_bad_openai_call

Function test_bad_openai_call

client-libs/python/openpipe/test_sync_client.py:382–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

380
381
382def test_bad_openai_call():
383 try:
384 client.chat.completions.create(
385 model="gpt-3.5-turbo-blaster",
386 messages=[{"role": "system", "content": "count to 10"}],
387 stream=True,
388 )
389 assert False
390 except Exception:
391 pass
392
393 if not TEST_LAST_LOGGED:
394 return
395
396 last_logged = (
397 client.openpipe_reporting_client.base_client.local_testing_only_get_latest_logged_call()
398 )
399 assert (
400 last_logged.error_message == "The model `gpt-3.5-turbo-blaster` does not exist"
401 )
402 assert last_logged.status_code == 404
403
404
405def test_bad_openpipe_call():

Callers

nothing calls this directly

Calls 2

createMethod · 0.45

Tested by

no test coverage detected