Skip to content

Commit 7028747

Browse files
committed
update test for checking constraint
1 parent 498f547 commit 7028747

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/django-google-spanner/tests/system/django_spanner/test_check_constraint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import unittest
99

1010
from django.db import connection
11+
from django.db.utils import IntegrityError
1112
from django.test import TransactionTestCase
1213
from django.utils import timezone
1314
from google.api_core.exceptions import OutOfRange
@@ -61,5 +62,5 @@ def test_insert_invalid_value(self):
6162
now = timezone.now()
6263
now_minus_1_day = now - timezone.timedelta(days=1)
6364
event_invalid = Event(start_date=now, end_date=now_minus_1_day)
64-
with self.assertRaises(OutOfRange):
65+
with self.assertRaises(IntegrityError):
6566
event_invalid.save()

0 commit comments

Comments
 (0)