mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Made Model.__eq__ consider proxy models equivalent
Fixed #11892, fixed #16458, fixed #14492.
This commit is contained in:
parent
4090982617
commit
4668c142dc
7 changed files with 60 additions and 1 deletions
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue