From dd74882617d6881b36b5cd54cd074f9825dc7022 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 24 Mar 2020 20:13:04 +0530 Subject: [PATCH] fix(bigquery): fix repr of model reference --- google/cloud/bigquery/model.py | 2 +- tests/unit/model/test_model.py | 2 +- tests/unit/model/test_model_reference.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/bigquery/model.py b/google/cloud/bigquery/model.py index d39ec5f2f..a2510e86c 100644 --- a/google/cloud/bigquery/model.py +++ b/google/cloud/bigquery/model.py @@ -430,6 +430,6 @@ def __hash__(self): return hash(self._key()) def __repr__(self): - return "ModelReference(project='{}', dataset_id='{}', project_id='{}')".format( + return "ModelReference(project_id='{}', dataset_id='{}', model_id='{}')".format( self.project, self.dataset_id, self.model_id ) diff --git a/tests/unit/model/test_model.py b/tests/unit/model/test_model.py index bbb93ef9e..90fc09e66 100644 --- a/tests/unit/model/test_model.py +++ b/tests/unit/model/test_model.py @@ -316,5 +316,5 @@ def test_repr(target_class): got = repr(model) assert got == ( "Model(reference=ModelReference(" - "project='my-proj', dataset_id='my_dset', project_id='my_model'))" + "project_id='my-proj', dataset_id='my_dset', model_id='my_model'))" ) diff --git a/tests/unit/model/test_model_reference.py b/tests/unit/model/test_model_reference.py index ff1d1df7d..39dabb55d 100644 --- a/tests/unit/model/test_model_reference.py +++ b/tests/unit/model/test_model_reference.py @@ -136,5 +136,5 @@ def test_repr(target_class): got = repr(model) assert ( got - == "ModelReference(project='my-proj', dataset_id='my_dset', project_id='my_model')" + == "ModelReference(project_id='my-proj', dataset_id='my_dset', model_id='my_model')" )