mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
update tests
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 34s
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 34s
This commit is contained in:
parent
d5a288e29e
commit
55139b8fd6
3 changed files with 5 additions and 5 deletions
|
@ -308,7 +308,7 @@ def test_completion_bad_org():
|
|||
)
|
||||
|
||||
print(exc_info.value)
|
||||
assert "No such organization: bad-org" in str(exc_info.value)
|
||||
assert "header should match organization for API key" in str(exc_info.value)
|
||||
|
||||
if _old_org is not None:
|
||||
os.environ["OPENAI_ORGANIZATION"] = _old_org
|
||||
|
|
|
@ -2134,7 +2134,7 @@ def test_completion_openai_organization():
|
|||
)
|
||||
pytest.fail("Request should have failed - This organization does not exist")
|
||||
except Exception as e:
|
||||
assert "No such organization: org-ikDc4ex8NB" in str(e)
|
||||
assert "header should match organization for API key" in str(e)
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
|
|
@ -448,7 +448,7 @@ async def test_openai_with_organization(sync_mode):
|
|||
)
|
||||
except Exception as e:
|
||||
print("Got exception: " + str(e))
|
||||
assert "No such organization: org-ikDc4ex8NB" in str(e)
|
||||
assert "header should match organization for API key" in str(e)
|
||||
|
||||
# good org works
|
||||
response = router.completion(
|
||||
|
@ -478,7 +478,7 @@ async def test_openai_with_organization(sync_mode):
|
|||
)
|
||||
except Exception as e:
|
||||
print("Got exception: " + str(e))
|
||||
assert "No such organization: org-ikDc4ex8NB" in str(e)
|
||||
assert "header should match organization for API key" in str(e)
|
||||
|
||||
# good org works
|
||||
response = await router.acompletion(
|
||||
|
@ -581,7 +581,7 @@ async def test_aaaaatext_completion_with_organization():
|
|||
pytest.fail("Request should have failed - This organization does not exist")
|
||||
except Exception as e:
|
||||
print("Got exception: " + str(e))
|
||||
assert "No such organization: org-ikDc4ex8NB" in str(e)
|
||||
assert "header should match organization for API key" in str(e)
|
||||
|
||||
# good org works
|
||||
response = await router.atext_completion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue