summaryrefslogtreecommitdiff
path: root/tests/proxy_models
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2013-08-07 09:51:32 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2013-08-19 09:51:28 +0300
commit4668c142dce77c6f29fb75532c1acfa1b2d322ff (patch)
tree0d4bfb51d43879c9e0410e42152542a3c78e828d /tests/proxy_models
parent40909826172374b849ddc9db8e1a8be9a8c3251b (diff)
downloaddjango-4668c142dce77c6f29fb75532c1acfa1b2d322ff.tar.gz
Made Model.__eq__ consider proxy models equivalent
Fixed #11892, fixed #16458, fixed #14492.
Diffstat (limited to 'tests/proxy_models')
-rw-r--r--tests/proxy_models/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/proxy_models/tests.py b/tests/proxy_models/tests.py
index 240198cc39..3598d65935 100644
--- a/tests/proxy_models/tests.py
+++ b/tests/proxy_models/tests.py
@@ -362,6 +362,9 @@ class ProxyModelTests(TestCase):
p = MyPerson.objects.get(pk=100)
self.assertEqual(p.name, 'Elvis Presley')
+ def test_eq(self):
+ self.assertEqual(MyPerson(id=100), Person(id=100))
+
class ProxyModelAdminTests(TestCase):
fixtures = ['myhorses']