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 Overflow
🌐
Full 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.
Discussions

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
🌐 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
🌐 r/learnpython
5
4
April 29, 2023
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
🌐 r/learnpython
3
2
August 28, 2022
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
🌐 r/learnpython
16
55
June 17, 2023
🌐
Honeybadger
honeybadger.io › blog › python-integration-testing
How to get more from Python integration testing - Honeybadger Developer Blog
December 3, 2025 - I’ll test the interactions between a Flask blog and an external service, in this case, a weather API that returns values after a simple call. The tests use the Pytest framework with the Coverage module installed to list code coverage.
🌐
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.
🌐
Medium
medium.com › @KMSSolutions › ensuring-python-modules-together-python-integration-testing-strategies-a518065d1f1f
Ensuring Python Modules Together: Python Integration Testing Strategies | by KMS Solutions | Medium
November 5, 2024 - Each approach has its strengths ... Here is an example of Python integration testing for a banking project using the Pytest framework:...
Find elsewhere
🌐
Real Python
realpython.com › python-testing
Getting Started With Testing in Python – Real Python
August 16, 2024 - You can write both integration tests and unit tests in Python. To write a unit test for the built-in function sum(), you would check the output of sum() against a known output. For example, here’s how you check that the sum() of the numbers (1, 2, 3) equals 6:
🌐
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.
🌐
Medium
medium.com › @ujwalabothe › integration-testing-with-pytest-testing-real-world-scenarios-c506f4bf1bff
Integration Testing with pytest: Testing Real-World Scenarios | by Ujwala Bothe | Medium
November 16, 2023 - Any .py file with naming test_*.py or *_test.py are common naming conventions for test files in pytest framework . Framework will execute all the tests with is having test_*.py or *_test.py. e.g lets consider you have written the test login ...
🌐
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
    
Published   Nov 17, 2022
Version   0.2.3
🌐
Temporal
docs.temporal.io › develop › python sdk › testing
Testing - Python SDK | Temporal Platform Documentation
Because the test server supports skipping time, use the test server for both end-to-end and integration tests with Workers. Some SDKs have support or examples for popular test frameworks, runners, or libraries. One recommended framework for testing in Python for the Temporal SDK is pytest, ...
🌐
DEV Community
dev.to › amnish04 › testing-in-python-4ne7
Testing in Python - DEV Community
November 15, 2023 - To begin with, I added a very general test that called my program against a markdown file, and comparted the generated html with the expected snapshot. I created a dictionary to store the expected snapshots in a separate file.
🌐
TestAutomationTools.dev
testautomationtools.dev › home › blog › top 6 python testing frameworks: a comprehensive guide
Top 6 Python Testing Frameworks: A Comprehensive Guide - TestAutomationTools.dev
July 9, 2023 - Integration testing involves testing the interaction and communication between different components or modules of an application. PyTest-BDD, a behavior-driven development (BDD) framework, is a popular choice for integration testing in Python.
🌐
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…
🌐
Startdataengineering
startdataengineering.com › post › python-datapipeline-integration-test
How to Write Integration Tests for Python Data Pipelines – Start Data Engineering
Most pipelines have ETL in some order (ELTL, etc). It’s a good idea to create integration tests for each interaction, especially when multiple services or custom code are involved. For example, assume we have a Python script → S3 → Snowflake.
🌐
Aviator
aviator.co › aviator blog › complete guide to python testing frameworks
Complete Guide to python Testing Frameworks | Aviator
September 25, 2025 - DocTest is another testing framework for Python. Just like unittest, it supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from the reporting framework.