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

Function test_bad_openpipe_call

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

Source from the content-addressed store, hash-verified

403
404
405def test_bad_openpipe_call():
406 try:
407 client.chat.completions.create(
408 model="openpipe:gpt-3.5-turbo-blaster",
409 messages=[{"role": "system", "content": "count to 10"}],
410 stream=True,
411 )
412 assert False
413 except Exception:
414 pass
415
416 if not TEST_LAST_LOGGED:
417 return
418
419 last_logged = (
420 client.openpipe_reporting_client.base_client.local_testing_only_get_latest_logged_call()
421 )
422 assert (
423 last_logged.error_message
424 == "The model `openpipe:gpt-3.5-turbo-blaster` does not exist"
425 )
426 assert last_logged.status_code == 404
427
428
429def test_bad_openai_initialization():

Callers

nothing calls this directly

Calls 2

createMethod · 0.45

Tested by

no test coverage detected