ton-devtools-pytest
pytest plugin for declarative ICP integration testing.
Part of the ton-devtools monorepo.
What it does
Auto-registered pytest plugin that hides all ICP authentication boilerplate behind declarative fixtures:
icp_harness— generates wallets, signs proofs, issues JWTs in one callicp_strict_mode— enforces TRMC security policies, fails on violationsMockWallet— real ed25519 keypair, produces valid TON Connect 2.0 proofs
Installation
pip install ton-devtools-pytest
The plugin registers automatically via the pytest11 entry point.
No conftest.py configuration required.
Quick Start
from ton_devtools_pytest.asserts import assert_authenticated
async def test_profile_read(icp_harness):
user = icp_harness.create_mock_user(roles=["user"])
resp = await icp_harness.client.get("/me/profile")
assert resp.status_code == 200
async def test_high_risk_blocked(icp_strict_mode):
user = icp_strict_mode.create_mock_user(risk_score="high")
resp = await icp_strict_mode.client.post("/proposals", json={...})
icp_strict_mode.assert_no_high_risk_pass(resp)
CLI options
pytest --icp-base-url=http://localhost:8000 --icp-jwt-secret=your-secret
Or via environment variables: ICP_BASE_URL, ICP_JWT_SECRET.
License
MIT
Metadata
Release files for ton-devtools-pytest 0.1.0
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 | Actions |
|---|---|---|---|---|
| ton_devtools_pytest-0.1.0.tar.gz | 9.8 kB | Without provenance | Details for ton_devtools_pytest-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ton_devtools_pytest-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ton_devtools_pytest-0.1.0-py3-none-any.whl |
Total release size: 19.8 kB
Release files / ton_devtools_pytest-0.1.0.tar.gz
| Download URL | ton_devtools_pytest-0.1.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfba1813c4c341f40208a59e2f7a37a7287f2a5c1a37fdf1495e5fd584d49e36
|
|
BLAKE2b-256 checksum How to use checksums |
00c25dee820bfb91c92ca24cc3f81a930520caadb3c60b38f4d1738a1de1d5e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / ton_devtools_pytest-0.1.0-py3-none-any.whl
| Download URL | ton_devtools_pytest-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df1a0047e9247be458935ca1bd89977f2257739788f3ffd1974aabc71c2700a9
|
|
BLAKE2b-256 checksum How to use checksums |
d175b4220b5ddd16f2ab1e5cfca31e7ad19bdab86c856b636842b5a4c6b6863e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for ton-devtools-pytest 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.