test_manager_inheritance_from_future.py 507 B

123456789101112131415
  1. from django.db import models
  2. from django.test import SimpleTestCase
  3. from django.test.utils import isolate_apps
  4. @isolate_apps('model_meta')
  5. class TestManagerInheritanceFromFuture(SimpleTestCase):
  6. def test_defined(self):
  7. """
  8. Meta.manager_inheritance_from_future can be defined for backwards
  9. compatibility with Django 1.11.
  10. """
  11. class FuturisticModel(models.Model):
  12. class Meta:
  13. manager_inheritance_from_future = True # No error raised.