Practical and honest
No dogma, just good reasons for each choice. Our CI is faster and our tests are clearer.
Browse
Write tests that catch real bugs: fixtures, parametrisation, mocking, testing APIs and databases, coverage and running it all in CI
Created by Lukas Brenner
Most Python developers know they should write tests. Fewer enjoy it, usually because their tests are slow, fragile or test the wrong things. This course teaches pytest in a way that makes tests feel useful: short, fast and focused on behaviour you actually care about.
We work on a realistic codebase, a small invoicing service with business rules, a database and calls to an external payment API. You will add tests to code that has none, find real bugs on the way and refactor with confidence once the tests are in place.
Good tests describe behaviour, not implementation. They fail when something users depend on breaks, and they keep passing when you rename an internal function. Throughout the course we look at test smells, such as excessive mocking or giant fixtures, and how to fix them.
You should be comfortable writing Python functions and classes. No testing experience is required, but if you have written some tests before, the later sections will still have plenty for you.
Backend engineer teaching API design, Python services and testing that catches real bugs
I design and build backend services and APIs, mostly in Python with FastAPI and PostgreSQL. A large part of my job is reviewing API contracts, writing tests and figuring out why something that worked on a laptop fails in production.
My courses are opinionated but honest about trade offs. I show the approach I use, explain the alternatives and point out when the alternative is the better choice for your situation.
I like small, boring, well tested systems. If you finish one of my courses with a habit of writing a failing test before a fix, I consider that a success.
No dogma, just good reasons for each choice. Our CI is faster and our tests are clearer.
The factory fixture pattern cleaned up hundreds of lines in our test suite.
The boundary testing lesson made me check our own discount logic, and we had the same off by one error.
I appreciated the clear rules on when not to mock. The respx lesson was new to me and very handy.
I had heard of property based testing but never tried it. It found a rounding issue in my project on the first run.
Transaction rollback per test sped our suite up a lot. Would like more on Django specifically.
Lots of content packed into short lessons. I needed to pause often, but the material is good.