From b49008245d1af9a8fdd2eb8cae1cad1ec7b7af04 Mon Sep 17 00:00:00 2001 From: Nick Cook Date: Tue, 27 Jun 2023 08:06:22 -0700 Subject: [PATCH] fix: broken tests due to str(enum) changes in Python 3.11 --- video/transcoder/get_job_state.py | 2 +- video/transcoder/job_test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/video/transcoder/get_job_state.py b/video/transcoder/get_job_state.py index 86e2b3410668..15937fa30597 100644 --- a/video/transcoder/get_job_state.py +++ b/video/transcoder/get_job_state.py @@ -42,7 +42,7 @@ def get_job_state(project_id, location, job_id): name = f"projects/{project_id}/locations/{location}/jobs/{job_id}" response = client.get_job(name=name) - print(f"Job state: {str(response.state)}") + print(f"Job state: {str(response.state.name)}") return response diff --git a/video/transcoder/job_test.py b/video/transcoder/job_test.py index 74d2b9eeed72..85cbf5fa6438 100644 --- a/video/transcoder/job_test.py +++ b/video/transcoder/job_test.py @@ -89,8 +89,8 @@ output_uri_for_concat = f"gs://{output_bucket_name}/test-output-concat/" preset = "preset/web-hd" -job_succeeded_state = "ProcessingState.SUCCEEDED" -job_running_state = "ProcessingState.RUNNING" +job_succeeded_state = "SUCCEEDED" +job_running_state = "RUNNING" @pytest.fixture(scope="module")