It depends a bit on the application you are testing. Let's say your application is an API, then the integration test could be simply calling the different endpoints and comparing the results.
You could make an IntegrationTest class with the proper write_result functions.
So a function could be:
def test_get_users_status(self):
expected_result = { "user1": "active", "user2": "inactive" }
r = requests.get('https://localhost:8080/get_users_status', auth=('user', 'pass'))
assert r.status_code is 200
self.write_json(expected_result, r.json())
You can have a function in the integration class that runs all tests, all authentication related tests etc.
Answer from trippelganger on Stack OverflowFull Stack Python
fullstackpython.com › integration-testing.html
Integration Testing - Full Stack Python
Integration testing with Context Managers gives an example of a system that needs integration tests and shows how context managers can be used to address the problem.
Pylonsproject
docs.pylonsproject.org › projects › pyramid › en › latest › narr › testing.html
Unit, Integration, and Functional Testing — The Pyramid Web Framework v2.1
In the context of a Pyramid integration test, the test logic exercises the functionality of the code under test and its integration with the rest of the Pyramid framework.
testing - Integration test in python - Stack Overflow
I have a python project that I want to test. I already have unit test with unittest but I need to do integration tests. For that, I have two applications: the real one that I have to test, and a " More on stackoverflow.com
Options for automated testing framework (not unittest)
All the frameworks I have seen (unittest, pytest etc) all concentrate on unit tests, calling class methods with a bunch of asserts in them. I dont think this kind of testing suits me. I need to do stuff like re-run certain tests multiple times with different data (and expect different outputs). all of the frameworks that you mentioned can do "re-run certain tests multiple times with different data (and expect different outputs)." More on reddit.com
Best testing framework?
You can't go wrong with Pytest – it's what almost everyone uses (or at least knows), and it's not hard to get into. Another option would be Hypothesis if you're feeling more adventurous. I haven't tried it myself but it sure seems like an interesting approach. More on reddit.com
Python unit test resources...
Anything by Brian Okken. He has a podcast called Test and Code, is on Python Bytes, and has written a few books on writing tests with pytest. He also maintains a bunch of useful pytest libraries. More on reddit.com
Videos
00:31
Unit vs Integration vs End-to-End Testing in Python - YouTube
54:15
Testing Your Python Code Base: Unit vs. Integration | Real Python ...
37:24
PyTest • REST API Integration Testing with Python - YouTube
19:50
Integration Testing For Flask Applications - Python API Testing ...
How To Write Unit Tests in Python • Pytest Tutorial
Data Focused Python
briankolowitz.github.io › data-focused-python › lectures › Topic 04 - Writing Testable Code › 06 - Writing Integration Tests.html
06 - Writing Integration Tests - Data Focused Python
!python -m unittest discover -s project/tests/integration · ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK · Many integration tests will require backend data like a database to exist with certain values. For example, you might want to have a test that checks that the application displays correctly with more than 100 customers in the database, or the order page works even if the product names are displayed in Japanese.
OpenClassrooms
openclassrooms.com › en › courses › 7747411-test-your-python-project › 7895358-write-integration-tests
Write Integration Tests
The web browser you are using is out of date, please upgrade
Dian Apps
dianapps.com › home › python integration testing
Python Integration Testing
May 28, 2025 - Pytest is a lightweight Python testing framework. It’s an excellent framework for integration and unit testing in Python, with a very gentle learning curve in addition to being time-saving due to its capacity for headless parallel testing. Pytest offers a more streamlined and concise method of creating Python test cases.
DataCamp
campus.datacamp.com › courses › introduction-to-testing-in-python › basic-testing-types
Integration testing with pytest | Python
Let's take a look at the example. Assume we want to check the integration of the file system with the Python interpreter. In other words, we want to make sure, that Python can create and open files on our computer. In the code, we have the "setup file" fixture function that creates the file and removes it on the teardown phase, that starts with "yield". Hence, the test function "test fs" will ensure the file exists.
PyPI
pypi.org › project › pytest-integration
pytest-integration · PyPI
That means that nodes that receive only unit tests that pass, will continue to run (slow) integration tests, even if another node receives a unit test that fails. These details have been verified by PyPI · jbwdevries · These details have not been verified by PyPI · Homepage · Bug Tracker · Source Code · License: MIT License · Author: Johan B.W. de Vries · Requires: Python >=3.6 · Framework ·
» pip install pytest-integration
Fluid Attacks
fluidattacks.com › blog › building-python-testing-framework
Building a Python testing framework | Fluid Attacks
If you look for Python testing tools or frameworks on the Internet, you'll find articles like "Python Testing Frameworks" by E. Sales, "10 Best Python Testing Frameworks" by GeeksForGeeks, "Top 9 Python Testing Frameworks" by M. Echout, and many other blog posts with similar rankings where pytest is never missing. The comparison with other tools seems unfair since pytest is a tool for unit and integration testing, whereas other frameworks compete in a very specific domain. Lettuce and Behave, for example, introduce behavior-driven development, but they're not for all development teams; Robot works for end-to-end tests and RPA, but it's not for unit or simple integration tests; Testify, TestProject, and others are dead projects…