diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 6e6868edfb..cec4db1edb 100644
a
|
b
|
from django.test import (
|
19 | 19 | ) |
20 | 20 | |
21 | 21 | from .models import ( |
22 | | Article, Object, ObjectReference, Person, Post, RawData, Reporter, |
| 22 | Article, Author, Object, ObjectReference, Person, Post, RawData, Reporter, |
23 | 23 | ReporterProxy, SchoolClass, Square, |
24 | 24 | VeryLongModelNameZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ, |
25 | 25 | ) |
… |
… |
class DBConstraintTestCase(TestCase):
|
778 | 778 | intermediary_model.objects.create(from_object_id=obj.id, to_object_id=12345) |
779 | 779 | self.assertEqual(obj.related_objects.count(), 1) |
780 | 780 | self.assertEqual(intermediary_model.objects.count(), 2) |
| 781 | |
| 782 | def test_field_unique_integrity_error(self): |
| 783 | Author.objects.create(name='Tolkien') |
| 784 | with self.assertRaises(IntegrityError): |
| 785 | Author.objects.create(name='Tolkien') |