Commit 9be15c0 1 parent 4050713 commit 9be15c0 Copy full SHA for 9be15c0
File tree 1 file changed +2
-5
lines changed
tests/system/django_spanner
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 7
7
from .models import Author , Number
8
8
from django .test import TransactionTestCase
9
9
from django .db import connection , ProgrammingError
10
- from django .db .utils import IntegrityError
11
10
from decimal import Decimal
12
11
from tests .system .django_spanner .utils import (
13
12
setup_instance ,
@@ -89,12 +88,10 @@ def test_decimal_precision_limit(self):
89
88
"""
90
89
num_val = Number (num = Decimal (1 ) / Decimal (3 ))
91
90
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 ):
94
92
num_val .save ()
95
93
else :
96
- msg = "400 Invalid value for bind parameter a0: Expected NUMERIC."
97
- with self .assertRaisesRegex (ProgrammingError , msg ):
94
+ with self .assertRaisesRegex (ProgrammingError ):
98
95
num_val .save ()
99
96
100
97
def test_decimal_update (self ):
You can’t perform that action at this time.
0 commit comments