1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Made Model.__eq__ consider proxy models equivalent

Fixed #11892, fixed #16458, fixed #14492.
This commit is contained in:
Anssi Kääriäinen
2013-08-07 09:51:32 +03:00
parent 4090982617
commit 4668c142dc
7 changed files with 60 additions and 1 deletions

View File

@@ -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']