From 3c090265c63dc9190e6e3bdc7af0c498535f4821 Mon Sep 17 00:00:00 2001 From: Trevor Blanchard <55503092+ttblanchard@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:22:20 -0500 Subject: [PATCH] fix linters after rebase Signed-off-by: Trevor Blanchard <55503092+ttblanchard@users.noreply.github.com> --- src/deadline_test_fixtures/deadline/worker.py | 14 +++++++------- test/unit/deadline/test_worker.py | 5 ++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/deadline_test_fixtures/deadline/worker.py b/src/deadline_test_fixtures/deadline/worker.py index 0e36f02..8e6bcec 100644 --- a/src/deadline_test_fixtures/deadline/worker.py +++ b/src/deadline_test_fixtures/deadline/worker.py @@ -160,7 +160,7 @@ def configure_worker_command( @abc.abstractmethod def get_worker_id(self) -> str: raise NotImplementedError("'get_worker_id' was not implemented.") - + def userdata(self, s3_files) -> str: raise NotImplementedError("'userdata' was not implemented.") @@ -509,13 +509,13 @@ def ami_ssm_param_name(self) -> str: def get_worker_id(self) -> str: cmd_result = self.send_command( - " ; ".join( - [ - "$worker=Get-Content -Raw C:\ProgramData\Amazon\Deadline\Cache\worker.json | ConvertFrom-Json", - "echo $worker.worker_id", - ] - ) + " ; ".join( + [ + "$worker=Get-Content -Raw C:\ProgramData\Amazon\Deadline\Cache\worker.json | ConvertFrom-Json", + "echo $worker.worker_id", + ] ) + ) assert cmd_result.exit_code == 0, f"Failed to get Worker ID: {cmd_result}" worker_id = cmd_result.stdout.rstrip("\n\r") diff --git a/test/unit/deadline/test_worker.py b/test/unit/deadline/test_worker.py index 127967d..5131fbb 100644 --- a/test/unit/deadline/test_worker.py +++ b/test/unit/deadline/test_worker.py @@ -159,7 +159,6 @@ def worker( ssm_client=boto3.client("ssm"), deadline_client=boto3.client("deadline"), configuration=worker_config, - worker_id="worker-7c3377ec9eba444bb51cc7da18463081", ) @patch.object(mod, "open", mock_open(read_data="mock data".encode())) @@ -367,7 +366,7 @@ def test_get_worker_id(self, worker_id: str, worker: PosixInstanceWorker) -> Non worker, "send_command", return_value=CommandResult(exit_code=0, stdout=worker_id) ): # WHEN - result = worker.worker_id + result = worker.get_worker_id() # THEN assert result == worker_id.rstrip("\n\r") @@ -541,7 +540,7 @@ def test_worker_id(self, worker: DockerContainerWorker) -> None: with patch.object(worker, "send_command", return_value=send_command_result): # WHEN - result = worker.worker_id + result = worker.get_worker_id() # THEN assert result == worker_id