Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9be15c0

Browse filesBrowse files
authored
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
Copy full SHA for 9be15c0

File tree

1 file changed

+2
-5
lines changed
Filter options

1 file changed

+2
-5
lines changed

‎tests/system/django_spanner/test_decimal.py

Copy file name to clipboardExpand all lines: tests/system/django_spanner/test_decimal.py
+2-5Lines changed: 2 additions & 5 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.