Unit Tests with an AI Assistant
Learn to ask an AI assistant for pytest tests, then review them like a skeptic: spot weak asserts, check boundaries, and verify security tests for input validation, XSS, path traversal, password storage and access control.
- Intermediate level
- 4 modules
- 10 lessons
- 46 quiz questions
Syllabus
01Tests You Can TrustWhat a unit test is, how pytest runs one, and why a test is only worth keeping if it can fail.2 lessons
02Asking an AI for TestsHow to write a prompt that gets useful pytest tests, and how to review what comes back.2 lessons
03Security Tests the Model Drafts and You VerifyFive common weaknesses in the choir's small web app, each with a function that is safe, a version that is not, and tests that tell them apart.5 lessons
04Limits and EthicsWhat generated tests cannot do for you, and the habits that keep you responsible for the result.1 lesson