()
| 403 | |
| 404 | |
| 405 | def 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 | |
| 429 | def test_bad_openai_initialization(): |
nothing calls this directly
no test coverage detected