Pattern – integration and system tests

Throughout this book, we've stressed the fact that unit tests are not integration tests. They have a different purpose to validating that the system works when integrated. Having said that, integration tests are also important and shouldn't be ignored. Integration tests can be written using the same unittest framework that we use for writing unit tests. The key points to keep in mind when writing integration tests are as follows:

  • Still disable non-core services: Keep non-core services such as analytics or logging disabled. These do not affect the functionality of the application.
  • Enable all core services: Every other service should be live. We don't want to mock or fake these because this defeats the whole ...

Get Test-Driven Python Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.