From 38224cff39e148932f1fb067869d93b08e4f4893 Mon Sep 17 00:00:00 2001 From: larkee Date: Tue, 14 Nov 2023 10:26:06 +1100 Subject: [PATCH] test: add test to enough the PG.OID param type is correct --- tests/unit/test_param_types.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/unit/test_param_types.py b/tests/unit/test_param_types.py index 02f41c1f25..b95c5fe0d9 100644 --- a/tests/unit/test_param_types.py +++ b/tests/unit/test_param_types.py @@ -71,3 +71,20 @@ def test_it(self): found = param_types.PG_JSONB self.assertEqual(found, expected) + + +class Test_OidParamType(unittest.TestCase): + def test_it(self): + from google.cloud.spanner_v1 import Type + from google.cloud.spanner_v1 import TypeCode + from google.cloud.spanner_v1 import TypeAnnotationCode + from google.cloud.spanner_v1 import param_types + + expected = Type( + code=TypeCode.INT64, + type_annotation=TypeAnnotationCode.PG_OID, + ) + + found = param_types.PG_OID + + self.assertEqual(found, expected)