litellm/tests/test_litellm/integrations/datadog
yuneng-jiang 7481649830
test(datadog): restore an empty DD_API_KEY instead of unsetting it (#37832)
Both datadog test files hand-roll what monkeypatch.setenv already does: read the
old value, write the test value, put the old one back on the way out. The cost
management fixture checks the old value for truthiness rather than for None, so
an operator running the suite with DD_API_KEY set to the empty string gets it
deleted rather than restored. Starting from DD_API_KEY="" and running test_init
leaves it None on the current file, and "" after this.

13 raw os.environ writes become monkeypatch.setenv, the two fixtures stop being
yield fixtures because there is nothing left to do on the way out, and the now
unused os import goes with them.

27 tests pass across the two files, 88 across tests/test_litellm/integrations/datadog.
2026-08-21 20:39:07 -07:00
..
test_datadog_cost_management.py test(datadog): restore an empty DD_API_KEY instead of unsetting it (#37832) 2026-08-21 20:39:07 -07:00
test_datadog_llm_obs_agent.py feat(datadog): add agent support for LLM Observability (#19574) 2026-01-22 19:49:22 -08:00
test_datadog_logger_batching.py fix(datadog): split log batches proactively under intake payload limits (#32860) 2026-07-10 20:54:42 -07:00
test_datadog_metrics.py test(datadog): restore an empty DD_API_KEY instead of unsetting it (#37832) 2026-08-21 20:39:07 -07:00
test_datadog_tags_regression.py fix(datadog): normalize alias and request tag values before submission (#37682) 2026-08-20 16:03:47 -07:00
test_datadog_team_handler.py fix(datadog): read team callback dd_* params from kwargs instead of blocked dynamic params (#35115) (#35687) 2026-08-03 16:19:56 -07:00