From 9be15c0c035016eed9158fc298e33b65b03bee19 Mon Sep 17 00:00:00 2001 From: Vikash Singh <3116482+vi3k6i5@users.noreply.github.com> Date: Tue, 15 Jun 2021 17:51:11 +0530 Subject: [PATCH] fix: remove error msg check from test_decimal_precision_limit (#646) * fix: remove error msg check from test_decimal_precision_limit * refactor: lint fixes --- tests/system/django_spanner/test_decimal.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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):