Skip to content

Commit 9be15c0

Browse files
authoredJun 15, 2021
fix: remove error msg check from test_decimal_precision_limit (#646)
* fix: remove error msg check from test_decimal_precision_limit * refactor: lint fixes
1 parent 4050713 commit 9be15c0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎tests/system/django_spanner/test_decimal.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from .models import Author, Number
88
from django.test import TransactionTestCase
99
from django.db import connection, ProgrammingError
10-
from django.db.utils import IntegrityError
1110
from decimal import Decimal
1211
from tests.system.django_spanner.utils import (
1312
setup_instance,
@@ -89,12 +88,10 @@ def test_decimal_precision_limit(self):
8988
"""
9089
num_val = Number(num=Decimal(1) / Decimal(3))
9190
if USE_EMULATOR:
92-
msg = "The NUMERIC type supports 38 digits of precision and 9 digits of scale."
93-
with self.assertRaisesRegex(IntegrityError, msg):
91+
with self.assertRaises(ValueError):
9492
num_val.save()
9593
else:
96-
msg = "400 Invalid value for bind parameter a0: Expected NUMERIC."
97-
with self.assertRaisesRegex(ProgrammingError, msg):
94+
with self.assertRaisesRegex(ProgrammingError):
9895
num_val.save()
9996

10097
def test_decimal_update(self):

0 commit comments

Comments
 (0)