From 583210f5ac0bcacc7c91c79090b9204344e339a5 Mon Sep 17 00:00:00 2001 From: Edward Park Date: Tue, 19 Sep 2023 12:21:32 -0700 Subject: [PATCH] pass in creds as config variable --- tests/test_vertex_worker.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_vertex_worker.py b/tests/test_vertex_worker.py index 59ccb79..1fe60ad 100644 --- a/tests/test_vertex_worker.py +++ b/tests/test_vertex_worker.py @@ -54,11 +54,10 @@ async def test_validate_empty_job_spec(self, gcp_credentials): base_job_template = VertexAIWorker.get_default_base_job_template() base_job_template["job_configuration"]["job_spec"] = {} base_job_template["job_configuration"]["region"] = "us-central1" - base_job_template["job_configuration"]["credentials"] = gcp_credentials with pytest.raises(pydantic.ValidationError) as excinfo: await VertexAIWorkerJobConfiguration.from_template_and_values( - base_job_template, {} + base_job_template, {"credentials": gcp_credentials} ) assert excinfo.value.errors() == [ @@ -87,11 +86,10 @@ async def test_validate_incomplete_worker_pool_spec(self, gcp_credentials): ], } base_job_template["job_configuration"]["region"] = "us-central1" - base_job_template["job_configuration"]["credentials"] = gcp_credentials with pytest.raises(pydantic.ValidationError) as excinfo: await VertexAIWorkerJobConfiguration.from_template_and_values( - base_job_template, {} + base_job_template, {"credentials": gcp_credentials} ) assert excinfo.value.errors() == [