diff --git a/tests/system/django_spanner/test_decimal.py b/tests/system/django_spanner/test_decimal.py index 63f378a8eb..778b5f8702 100644 --- a/tests/system/django_spanner/test_decimal.py +++ b/tests/system/django_spanner/test_decimal.py @@ -7,7 +7,6 @@ from .models import Author, Number from django.test import TransactionTestCase from django.db import connection, ProgrammingError -from django.db.utils import IntegrityError from decimal import Decimal from tests.system.django_spanner.utils import ( setup_instance, @@ -89,12 +88,10 @@ def test_decimal_precision_limit(self): """ num_val = Number(num=Decimal(1) / Decimal(3)) if USE_EMULATOR: - msg = "The NUMERIC type supports 38 digits of precision and 9 digits of scale." - with self.assertRaisesRegex(IntegrityError, msg): + with self.assertRaises(ValueError): num_val.save() else: - msg = "400 Invalid value for bind parameter a0: Expected NUMERIC." - with self.assertRaisesRegex(ProgrammingError, msg): + with self.assertRaisesRegex(ProgrammingError): num_val.save() def test_decimal_update(self):