A pytest plugin to help with testing idem projects
Project description
A pytest plugin to help with testing idem projects
INSTALLATION
Install with pip:
pip install pytest-idem
DEVELOPMENT INSTALLATION
Clone the pytest-idem repo and install with pip:
git clone https://gitlab.com/vmware/idem/pytest-idem.git pip install -e pytest-idem
ACCT
Some projects, specifically need credentials from idem’s ctx generator. A ctx fixture exists, but it won’t work unless you override the acct_file and acct_profile fixtures:
@pytest.fixture def acct_subs() -> List[str]: return ["azurerm", "vultr"] @pytest.fixture def acct_profile() -> str: return "test_development_idem_cloud"
Once these fixtures are overridden, the ctx fixture will become available to your test:
test_cloud_instance_present(hub, ctx): hub.state.cloud.present(ctx, "instance_name")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest-idem-4.0.1.tar.gz
(11.9 kB
view details)
Built Distribution
File details
Details for the file pytest-idem-4.0.1.tar.gz
.
File metadata
- Download URL: pytest-idem-4.0.1.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/41.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70b986cb33814b4b7cad6bf35b2f36af8499ef6c0e3ff8f3c2fb78678d86819d |
|
MD5 | a9192ebbf8c4e11e70f977c3e3200810 |
|
BLAKE2b-256 | 4eb2ea776225f9487c5890cb88843d42e8ee2bf2329b154a3b2b95b273de7db1 |
File details
Details for the file pytest_idem-4.0.1-py3-none-any.whl
.
File metadata
- Download URL: pytest_idem-4.0.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/41.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18c0a3a6e4b04966f0bc964aec0b7b7b18224d6541c243ac960ebb3bfad54557 |
|
MD5 | 879452392279bd95aed2c40174883b64 |
|
BLAKE2b-256 | d281667c7ef41c8664be4b62e21fffa710b985c422af136501ce5e0b1e2ea890 |