From 83914f8b3bec9f89c5a5c4233d05b9b333001bcc Mon Sep 17 00:00:00 2001 From: larkee Date: Tue, 14 Nov 2023 10:26:06 +1100 Subject: [PATCH] test: add test to check that 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 645774d79b..827f08658d 100644 --- a/tests/unit/test_param_types.py +++ b/tests/unit/test_param_types.py @@ -70,3 +70,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)