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-3.0.0.tar.gz
(11.7 kB
view hashes)
Built Distribution
Close
Hashes for pytest_idem-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95aca8515073a33d33a25ef6af787421c79630b6eb691fd63a8439dee81c3700 |
|
MD5 | 5b1ecc23ec3d8fffd307e73cbdc04d51 |
|
BLAKE2b-256 | 62d763b90e9e3555d7e2ed70fa4fff8b909d660c0d54f19f9d8b6e70a9c371bd |