Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove error msg check from test_decimal_precision_limit #646

Merged
merged 2 commits into from Jun 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions tests/system/django_spanner/test_decimal.py
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down