litellm/litellm
Marc Abramowitz 9167ff0d75 Set fake env vars for client_no_auth fixture
This allows all of the tests in `test_proxy_server.py` to pass, with the
exception of `test_load_router_config`, without needing to set up real
environment variables.

Before:

```shell
$ env -i PATH=$PATH poetry run pytest litellm/tests/test_proxy_server.py -k 'not test_load_router_config' --disable-warnings
...
========================================================== short test summary info ===========================================================
ERROR litellm/tests/test_proxy_server.py::test_bedrock_embedding - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
ERROR litellm/tests/test_proxy_server.py::test_chat_completion - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
ERROR litellm/tests/test_proxy_server.py::test_chat_completion_azure - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
ERROR litellm/tests/test_proxy_server.py::test_chat_completion_optional_params - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
ERROR litellm/tests/test_proxy_server.py::test_embedding - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
ERROR litellm/tests/test_proxy_server.py::test_engines_model_chat_completions - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
ERROR litellm/tests/test_proxy_server.py::test_health - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
ERROR litellm/tests/test_proxy_server.py::test_img_gen - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
ERROR litellm/tests/test_proxy_server.py::test_openai_deployments_model_chat_completions_azure - openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY enviro...
========================================== 2 skipped, 1 deselected, 39 warnings, 9 errors in 3.24s ===========================================
```

After:

```shell
$ env -i PATH=$PATH poetry run pytest litellm/tests/test_proxy_server.py -k 'not test_load_router_config' --disable-warnings
============================================================ test session starts =============================================================
platform darwin -- Python 3.12.3, pytest-7.4.4, pluggy-1.5.0
rootdir: /Users/abramowi/Code/OpenSource/litellm
plugins: anyio-4.3.0, asyncio-0.23.6, mock-3.14.0
asyncio: mode=Mode.STRICT
collected 12 items / 1 deselected / 11 selected

litellm/tests/test_proxy_server.py s.........s                                                                                         [100%]

========================================== 9 passed, 2 skipped, 1 deselected, 48 warnings in 8.42s ===========================================
```
2024-05-11 15:22:30 -07:00
..
assistants feat(assistants/main.py): support litellm.get_assistants() and litellm.get_messages() 2024-05-04 21:30:28 -07:00
deprecated_litellm_server
integrations Merge pull request #3424 from lunary-ai/main 2024-05-11 09:26:26 -07:00
llms Merge pull request #3582 from BerriAI/litellm_explicit_region_name_setting 2024-05-11 11:36:22 -07:00
proxy Merge pull request #3582 from BerriAI/litellm_explicit_region_name_setting 2024-05-11 11:36:22 -07:00
router_strategy feat(proxy_server.py): return litellm version in response headers 2024-05-08 16:00:08 -07:00
tests Set fake env vars for client_no_auth fixture 2024-05-11 15:22:30 -07:00
types feat(router.py): support region routing for bedrock, vertex ai, watsonx 2024-05-11 11:04:00 -07:00
__init__.py Merge pull request #3582 from BerriAI/litellm_explicit_region_name_setting 2024-05-11 11:36:22 -07:00
_logging.py feat(utils.py): json logs for raw request sent by litellm 2024-04-29 19:21:19 -07:00
_redis.py feat(proxy_server.py): return litellm version in response headers 2024-05-08 16:00:08 -07:00
_service_logger.py fix(test_lowest_tpm_rpm_routing_v2.py): unit testing for usage-based-routing-v2 2024-04-18 21:38:00 -07:00
_version.py
budget_manager.py feat(proxy_server.py): return litellm version in response headers 2024-05-08 16:00:08 -07:00
caching.py feat(slack_alerting.py): support sending daily reports on deployments 2024-05-06 17:18:42 -07:00
cost.json
exceptions.py fix(exceptions.py): import openai Exceptions 2024-05-02 21:43:50 +09:00
main.py Merge pull request #3369 from mogith-pn/main 2024-05-11 09:31:46 -07:00
model_prices_and_context_window_backup.json fix model cost map 2024-05-07 19:15:58 -07:00
requirements.txt
router.py Merge pull request #3582 from BerriAI/litellm_explicit_region_name_setting 2024-05-11 11:36:22 -07:00
timeout.py
utils.py Merge pull request #3582 from BerriAI/litellm_explicit_region_name_setting 2024-05-11 11:36:22 -07:00