simple_module_test
Shared pytest fixtures and helpers for writing tests against simple_module apps and modules.
Fixtures are exposed via a pytest11 entry point, so installing the package is enough — no conftest.py import needed.
Install
pip install simple_module_test
# or, if you already pulled in the framework:
pip install "simple_module_hosting[dev]"
What it provides
All fixtures below are auto-registered via the pytest11 entry point — installing the package is enough.
fake_event_bus— a fresh recordingEventBusper test that captures everypublish/publish_nowaitcall.build_test_app— callable returning a minimal FastAPI app that loads exactly one module.settings— a ready-to-useSettingsinstance with an in-memory SQLite database and multi-tenancy enabled.db_state,engine,db_session— freshDatabaseStateper test;db_sessionalso creates all module tables and stampsalembic_versionat head so the boot-time migration check passes.app— acreate_app(settings)instance withlifespanstarted and stopped.client— anhttpx.AsyncClientbound to the test app.authenticated_client— same but with an admin user seeded and a forged session cookie attached. Requires theusersmodule to be installed (it seeds the admin viausers.bootstrap); apps scaffolded bysmpyinclude it.
Usage
In a module's tests/test_something.py:
import pytest
pytestmark = pytest.mark.asyncio
async def test_create_order(authenticated_client):
resp = await authenticated_client.post(
"/api/orders",
json={"customer_id": 1, "total_cents": 9900},
)
assert resp.status_code == 201
assert resp.json()["total_cents"] == 9900
No fixture imports, no conftest.py — the pytest11 entry point auto-loads them.
Depends on
simple_module_core,simple_module_db,simple_module_hostingpytest,pytest-asyncio,httpx,sqlalchemy
License
MIT — see LICENSE.
Metadata
Release files for simple-module-test 0.0.35
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| simple_module_test-0.0.35.tar.gz | 16.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_module_test-0.0.35-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.4 kB
Release files / simple_module_test-0.0.35.tar.gz
| Download URL | simple_module_test-0.0.35.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ef4d9a69492952555de29087decdc5e740273bd0a7ad6aa7a7ccd271b4f476f
|
|
BLAKE2b-256 checksum How to use checksums |
978e856df876b256e3f3a17ab0d7a3f01766c6061c406d52925945f629e4962f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logRelease files / simple_module_test-0.0.35-py3-none-any.whl
| Download URL | simple_module_test-0.0.35-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02f3b83c66d1d09932a2c04740c700c5b93c7f933081bbae5c06a93593888ec3
|
|
BLAKE2b-256 checksum How to use checksums |
a9f2d46dba23e249db98de1bd372d9618a3410cb1caa77ef1e6dc751db08ab76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logSecurity for simple-module-test 0.0.35
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for simple_module_test-0.0.35.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.