Skip to main content

AWS Deadline Cloud Test Fixtures

pypi python license

This package contains pytest fixtures that are used to test AWS Deadline Cloud Python packages.

Usage

To use this package:

  1. Install it into your test environment
  2. Configure environment variables needed for your tests (see src/deadline_test_fixtures/example_config.sh for available options)
  3. Use the fixtures in your tests (see src/deadline_test_fixtures/fixtures.py for available fixtures)

For example, to use the worker fixture:

from deadline_test_fixtures import DeadlineWorker

def test_something_with_the_worker(worker: DeadlineWorker) -> None:
    # GIVEN
    worker.start()

    # WHEN
    result = worker.send_command("some command")

    # THEN
    assert result.stdout == "expected output"

You can also import the classes from this package directly to build your own fixtures

# double_worker.py
from deadline_test_fixtures import (
    DeadlineWorker,
    EC2InstanceWorker,
    DockerContainerWorker,
)

class DoubleWorker(DeadlineWorker):

    def __init__(
        self,
        # args...
    ) -> None:
        self.ec2_worker = EC2InstanceWorker(
            # args...
        )
        self.docker_worker = DockerContainerWorker(
            # args...
        )
    
    def start(self) -> None:
        self.ec2_worker.start()
        self.docker_worker.start()
    
    # etc.


# test_something.py
from .double_worker import DoubleWorker

import pytest

@pytest.fixture
def double_worker() -> DoubleWorker:
    return DoubleWorker(
        # args...
    )

def test_something(double_worker: DoubleWorker) -> None:
    # GIVEN
    double_worker.start()

    # etc.

DCC UI Test Components

The standard package installation includes the dependencies needed to test a graphical submitter:

pip install deadline-cloud-test-fixtures

The package provides four independent building blocks:

  • deadline_test_fixtures.deadline_mock: an observable, scenario-driven Deadline REST-JSON server. MockDeadlineServerProcess runs it outside the pytest process so native accessibility waits cannot starve the server thread.
  • deadline_test_fixtures.xa11y: cross-platform accessibility application discovery and reusable widget controls.
  • deadline_test_fixtures.job_bundle: conventional case directories and structural bundle comparison with configurable normalization.
  • deadline_test_fixtures.images: render comparison by dimensions and pixel tolerance.

Each DCC remains responsible for launching its host application and opening its plugin. A typical offline test setup is:

import os

from deadline_test_fixtures.deadline_mock import (
    MockDeadlineServerProcess,
    build_mock_environment,
    write_deadline_config,
)

with MockDeadlineServerProcess() as server:
    backend = server.backend
    assert backend is not None and server.base_url is not None
    write_deadline_config(
        tmp_path / "deadline.config",
        farm_id=backend.farm_id,
        queue_id=backend.queue_id,
        job_history_dir=tmp_path / "job_history",
    )
    env = build_mock_environment(
        os.environ,
        deadline_endpoint_url=server.base_url,
        config_path=tmp_path / "deadline.config",
        home_dir=tmp_path / "home",
    )
    # Launch the DCC with env, then locate its accessibility application.

find_accessibility_app locates a DCC host or submitter dialog by process ID and an optional application-name prefix. Each DCC remains responsible for launching, monitoring, and terminating its host process.

Deadline's service model injects a management. host prefix. A DCC subprocess must disable that injection or redirect management.* to loopback; the default DEADLINE_CLOUD_MOCK_MODE=1 environment marker is provided for a test sidecar to enable that behavior.

Testing submission

The mock also serves CreateJob and GetJob, so a test can press Submit and assert on what the submitter sent. Use a queue without job attachment settings: the Deadline client only hashes and uploads attachments to S3 (which the mock does not serve) when the queue has them.

from deadline_test_fixtures.deadline_mock import (
    MockDeadlineScenario,
    MockDeadlineServerProcess,
)

with MockDeadlineServerProcess(MockDeadlineScenario.without_job_attachments()) as server:
    # ... launch the DCC, drive the submitter, press Submit ...
    (job,) = server.backend.resources["jobs"]
    assert job["lifecycleStatus"] == "CREATE_COMPLETE"
    template = job["template"]  # the submitted template text, plus templateType
    parameters = job["parameters"]  # e.g. {"Frames": {"string": "1-10"}}

Each job holds the full CreateJob request with the fields the service assigns (jobId, name, lifecycleStatus, ...). Like the service, CreateJob rejects a template that is not a valid Open Job Description job template, and parameter values that neither the template nor the queue's environment templates accept. Pass validate_job_templates=False to the scenario to skip that check.

Telemetry

This library collects telemetry data by default. Telemetry events contain non-personally-identifiable information that helps us understand how users interact with our software so we know what features our customers use, and/or what existing pain points are.

You can opt out of telemetry data collection by either:

  1. Setting the environment variable: DEADLINE_CLOUD_TELEMETRY_OPT_OUT=true
  2. Setting the config file: deadline config set telemetry.opt_out true

Note that setting the environment variable supersedes the config file setting.

Build / Test / Release

Build the package.

hatch build

Run tests

hatch run test

Run linting

hatch run lint

Run formating

hatch run fmt

Run a tests for all supported Python versions.

hatch run all:test

Compatibility

This library requires:

  1. Python 3.9 or higher; and
  2. Linux, MacOS, or Windows operating system.

Versioning

This package's version follows Semantic Versioning 2.0, but is still considered to be in its initial development, thus backwards incompatible versions are denoted by minor version bumps. To help illustrate how versions will increment during this initial development stage, they are described below:

  1. The MAJOR version is currently 0, indicating initial development.
  2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API.
  3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API.

Downloading

You can download this package from:

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Metadata

Release files for deadline-cloud-test-fixtures 0.18.26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deadline-cloud-test-fixtures 0.18.26
File Size Uploaded Provenance Actions
deadline_cloud_test_fixtures-0.18.26.tar.gz 86.1 kB With provenance Details for deadline_cloud_test_fixtures-0.18.26.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deadline-cloud-test-fixtures 0.18.26
File Interpreter ABI Platform Actions
deadline_cloud_test_fixtures-0.18.26-py3-none-any.whl Python 3 none any Details for deadline_cloud_test_fixtures-0.18.26-py3-none-any.whl

Total release size: 185.0 kB

Release files / deadline_cloud_test_fixtures-0.18.26.tar.gz

Download URL deadline_cloud_test_fixtures-0.18.26.tar.gz
Size 86.1 kB
Tags Source
SHA-256 checksum
How to use checksums
875aac5f437ebc4b4dd90c940fd6d6f9e56a33749060d00e32a7d3f43139a218
BLAKE2b-256 checksum
How to use checksums
52960a202a352e6f5cb269d8147eb77119590c023b3f773be48422c7412046b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / deadline_cloud_test_fixtures-0.18.26-py3-none-any.whl

Download URL deadline_cloud_test_fixtures-0.18.26-py3-none-any.whl
Size 98.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7a4065e9483074578771e0d43ac24bc2e8f520886726a7c95ea403e680429bd
BLAKE2b-256 checksum
How to use checksums
8b07fb7275b3323223dc567d0d765d31c831a84a98d43c00300e4d2f653fa7e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for deadline-cloud-test-fixtures 0.18.26

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deadline_cloud_test_fixtures-0.18.26.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.18.26 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page