diff --git a/src/deadline_test_fixtures/fixtures.py b/src/deadline_test_fixtures/fixtures.py index 983a937..a08b6d7 100644 --- a/src/deadline_test_fixtures/fixtures.py +++ b/src/deadline_test_fixtures/fixtures.py @@ -104,7 +104,10 @@ def deadline_client( if endpoint_url: LOG.info(f"Using Amazon Deadline Cloud endpoint: {endpoint_url}") - return DeadlineClient(boto3.client("deadline", endpoint_url=endpoint_url)) + session = boto3.Session() + session._loader.search_paths.extend([install_service_model]) + + return DeadlineClient(session.client("deadline", endpoint_url=endpoint_url)) @pytest.fixture(scope="session") @@ -160,11 +163,11 @@ def service_model() -> Generator[ServiceModel, None, None]: @pytest.fixture(scope="session") -def install_service_model(service_model: ServiceModel) -> Generator[None, None, None]: +def install_service_model(service_model: ServiceModel) -> Generator[str, None, None]: LOG.info("Installing service model and configuring boto to use it for API calls") with service_model.install() as model_path: LOG.info(f"Installed service model to {model_path}") - yield + yield model_path @pytest.fixture(scope="session") diff --git a/src/deadline_test_fixtures/models.py b/src/deadline_test_fixtures/models.py index f3a7aa7..9a184d7 100644 --- a/src/deadline_test_fixtures/models.py +++ b/src/deadline_test_fixtures/models.py @@ -103,7 +103,7 @@ def install(self) -> Generator[str, None, None]: json_path.parent.mkdir(parents=True) json_path.write_text(src_file.read_text()) os.environ["AWS_DATA_PATH"] = tmpdir - yield str(json_path) + yield str(tmpdir) finally: if old_aws_data_path: os.environ["AWS_DATA_PATH"] = old_aws_data_path