Skip to main content

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


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.2.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

pytest_idem-2.0.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest-idem-2.0.2.tar.gz.

File metadata

  • Download URL: pytest-idem-2.0.2.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for pytest-idem-2.0.2.tar.gz
Algorithm Hash digest
SHA256 744efe25fa3f183f363484ec3f7d0542640956798b41f68ea1ee001b1b01fa0f
MD5 ef6a37e529c2fc247a58d3877e5fcf53
BLAKE2b-256 f23c9e9773df715c23f955f0c74834dddb218545563a730585433269eac9956e

See more details on using hashes here.

File details

Details for the file pytest_idem-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: pytest_idem-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for pytest_idem-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a865b4d73bb6e649b0f3a48d9a8365aedc5407c018ccd68ef191efc760e33ee
MD5 4ef1af1c0125acea9e26bddf80473edd
BLAKE2b-256 b41d273be108bf9a25cba270edfd3c59f2bf8772260931016db21cbe4c2aac9f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page