We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 498f547 commit 7028747Copy full SHA for 7028747
packages/django-google-spanner/tests/system/django_spanner/test_check_constraint.py
@@ -8,6 +8,7 @@
8
import unittest
9
10
from django.db import connection
11
+from django.db.utils import IntegrityError
12
from django.test import TransactionTestCase
13
from django.utils import timezone
14
from google.api_core.exceptions import OutOfRange
@@ -61,5 +62,5 @@ def test_insert_invalid_value(self):
61
62
now = timezone.now()
63
now_minus_1_day = now - timezone.timedelta(days=1)
64
event_invalid = Event(start_date=now, end_date=now_minus_1_day)
- with self.assertRaises(OutOfRange):
65
+ with self.assertRaises(IntegrityError):
66
event_invalid.save()
0 commit comments