| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,6 @@ | |||
| 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): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments