Tag
python-testing
Safeguard articles tagged "python-testing" — guides, analysis, and best practices for software supply chain and application security.
2 articles
DevSecOps
MagicMock in Python: Safe Testing and the Traps to Avoid
MagicMock in Python makes tests easy to write and easy to make lie. Here is how it differs from Mock and how to keep mocks from hiding real security bugs.
May 9, 20255 min read
DevSecOps
Python unittest.mock: A Practical Guide with Security in Mind
Python's unittest.mock lets you test the code you would never dare run for real — including the security-critical failure paths that never fire in a happy-path test.
May 8, 20256 min read