summaryrefslogtreecommitdiff
path: root/tests/model_meta/test_manager_inheritance_from_future.py
diff options
context:
space:
mode:
authorCharlie Denton <charleswdenton@gmail.com>2017-10-31 17:22:27 +0000
committerTim Graham <timograham@gmail.com>2017-10-31 21:57:00 -0400
commit2e6dd975a228d8a590248da38a2b6f4e74876260 (patch)
treef7d3fb46b64a05fdafcf0e5537595c57eb1052ec /tests/model_meta/test_manager_inheritance_from_future.py
parent542e6b0207850432e225596bc6faacb297f71382 (diff)
[2.0.x] Fixed #28750 -- Allowed models to define Meta.manager_inheritance_from_future for backwards compatibility.
Refs 631f4ab06112aca5bd6a57b81159048f936050bf. Backport of cbe334918a0a80762249706a15b699714b5dc828 from master
Diffstat (limited to 'tests/model_meta/test_manager_inheritance_from_future.py')
-rw-r--r--tests/model_meta/test_manager_inheritance_from_future.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/model_meta/test_manager_inheritance_from_future.py b/tests/model_meta/test_manager_inheritance_from_future.py
new file mode 100644
index 0000000000..2359489283
--- /dev/null
+++ b/tests/model_meta/test_manager_inheritance_from_future.py
@@ -0,0 +1,15 @@
+from django.db import models
+from django.test import SimpleTestCase
+from django.test.utils import isolate_apps
+
+
+@isolate_apps('model_meta')
+class TestManagerInheritanceFromFuture(SimpleTestCase):
+ def test_defined(self):
+ """
+ Meta.manager_inheritance_from_future can be defined for backwards
+ compatibility with Django 1.11.
+ """
+ class FuturisticModel(models.Model):
+ class Meta:
+ manager_inheritance_from_future = True # No error raised.