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

Uploaded Source

Built Distribution

pytest_idem-1.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest-idem-1.1.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for pytest-idem-1.1.0.tar.gz
Algorithm Hash digest
SHA256 eb65b9cf1c4bd5d85d8ecff4d9925e6844f3a533178cb1a34df480c176332143
MD5 95205bd2bbca2d289a84829464c65dfe
BLAKE2b-256 c998c8daaf26bc634dcf416187eadbb19a56df6bf4770aca24afda2c068ebfe6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_idem-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for pytest_idem-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1e3daa01073e26c3fddb6c85db1eb3d02fd9a4e3cc003b1b226747004c361a1
MD5 d1ce0db0893e1425c592d4b20d188f1a
BLAKE2b-256 35282c896360a0fd27391ef7481d1fdb53619e2f057e3ed6de8f942c97e97f41

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