Skip to content

Commit 68fa027

Browse files
authored
fix: broken tests due to str(enum) changes in Python 3.11 (#10323)
1 parent fe2f8d7 commit 68fa027

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

video/transcoder/get_job_state.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_job_state(project_id, location, job_id):
4242
name = f"projects/{project_id}/locations/{location}/jobs/{job_id}"
4343
response = client.get_job(name=name)
4444

45-
print(f"Job state: {str(response.state)}")
45+
print(f"Job state: {str(response.state.name)}")
4646
return response
4747

4848

video/transcoder/job_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
output_uri_for_concat = f"gs://{output_bucket_name}/test-output-concat/"
9090

9191
preset = "preset/web-hd"
92-
job_succeeded_state = "ProcessingState.SUCCEEDED"
93-
job_running_state = "ProcessingState.RUNNING"
92+
job_succeeded_state = "SUCCEEDED"
93+
job_running_state = "RUNNING"
9494

9595

9696
@pytest.fixture(scope="module")

0 commit comments

Comments
 (0)