diff --git a/tests/one_to_one/models.py b/tests/one_to_one/models.py
index 8a5defe..a71e65a 100644
a
|
b
|
class MultiModel(models.Model):
|
83 | 83 | |
84 | 84 | |
85 | 85 | class Target(models.Model): |
86 | | pass |
| 86 | name = models.CharField(max_length=50) |
87 | 87 | |
88 | 88 | |
89 | 89 | class Pointer(models.Model): |
diff --git a/tests/one_to_one/tests.py b/tests/one_to_one/tests.py
index 6604299..62cd1d5 100644
a
|
b
|
from django.test import TestCase
|
5 | 5 | |
6 | 6 | from .models import ( |
7 | 7 | Bar, Director, Favorites, HiddenPointer, ManualPrimaryKey, MultiModel, |
8 | | Place, RelatedModel, Restaurant, School, Target, UndergroundBar, Waiter, |
| 8 | Place, Pointer, RelatedModel, Restaurant, School, Target, UndergroundBar, |
| 9 | Waiter, |
9 | 10 | ) |
10 | 11 | |
11 | 12 | |
… |
… |
class OneToOneTests(TestCase):
|
283 | 284 | [] |
284 | 285 | ) |
285 | 286 | |
| 287 | def test_o2o_primary_key_delete(self): |
| 288 | t = Target.objects.create(name='name') |
| 289 | Pointer.objects.create(other=t) |
| 290 | num_deleted, _ = Pointer.objects.filter(other__name='name').delete() |
| 291 | self.assertEqual(num_deleted, 1) |
| 292 | |
286 | 293 | def test_reverse_object_does_not_exist_cache(self): |
287 | 294 | """ |
288 | 295 | Regression for #13839 and #17439. |