diff --git a/tests/model_inheritance/tests.py b/tests/model_inheritance/tests.py
index 0af96b8..125e2cd 100644
a
|
b
|
class ModelInheritanceTests(TestCase):
|
255 | 255 | 1, lambda: ItalianRestaurant.objects.select_related("chef")[0].chef |
256 | 256 | ) |
257 | 257 | |
| 258 | def test_select_related_defer(self): |
| 259 | r = Restaurant.objects.create( |
| 260 | name="Demon Dogs", |
| 261 | address="944 W. Fullerton", |
| 262 | serves_hot_dogs=True, |
| 263 | serves_pizza=False, |
| 264 | rating=2 |
| 265 | ) |
| 266 | ir = ItalianRestaurant.objects.create( |
| 267 | name="Ristorante Miron", |
| 268 | address="1234 W. Ash", |
| 269 | serves_hot_dogs=False, |
| 270 | serves_pizza=False, |
| 271 | serves_gnocchi=True, |
| 272 | rating=4, |
| 273 | ) |
| 274 | list(Restaurant.objects.select_related("italianrestaurant").defer("italianrestaurant__serves_gnocchi")) |
| 275 | |
258 | 276 | def test_mixin_init(self): |
259 | 277 | m = MixinModel() |
260 | 278 | self.assertEqual(m.other_attr, 1) |