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-2.0.0.tar.gz
(10.6 kB
view hashes)
Built Distribution
Close
Hashes for pytest_idem-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe9c9c158b625251f4ec3c59e64b05d8e2a695a9a0c00875977c47e712952e36 |
|
MD5 | fb6d9558eaac1d8f4dac95e4cac62a82 |
|
BLAKE2b-256 | 07e79c1d03a3d4c93746e97d018e23cb246a8767445c2d08a196ec56310f0e48 |