Information security
fromTheregister
1 week agoAI-pwned: Vercel breach traced to stolen employee creds
Vercel's CEO suspects AI aided attackers in a breach that exploited a compromised employee account and non-sensitive environment variables.
When writing tests in pytest, often there's a need to set environment variables for your tests. Instead of modifying `os.environ` directly, which can lead to side effects and make tests harder to manage, here's how to do it with the [pytest-env](https://pypi.org/project/pytest-env/) package. First, install the package. ```sh pip install pytest-env # classic but works great uv add pytest-env # if you're one of us cool kids using uv uv add pytest-env --group test # if you use a specific test group of dependencies ```