3 ms·
Doing Django dev right now. I always right unit tests for a component but not necessarily integration tests. Depends on whether or not the component interacts w
by AdamM12 8y ago
Doing Django dev right now. I always right unit tests for a component but not necessarily integration tests. Depends on whether or not the component interacts with an outside system (db, redis, aws, etc.). Always mock those systems if the component does. Also always assert as specific as possible on those mocks. I usually find by the time I have to write integration tests the majority of the issues are worked out as long as I'm very diligent about mocking the return values correctly.