From 055c01103de70b1f08321b1dbbcbc4da84821a79 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 8 Mar 2009 10:01:59 +0000 Subject: [1.0.x] Fixed #9508 -- Added an appropriate FileField.__hash__ implementation. Required because we declare a custom __eq__ method. Backport of r9997 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10000 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/file_storage/models.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/regressiontests/file_storage/models.py b/tests/regressiontests/file_storage/models.py index 32fb83b348..099c25444e 100644 --- a/tests/regressiontests/file_storage/models.py +++ b/tests/regressiontests/file_storage/models.py @@ -54,6 +54,11 @@ False >>> p.mugshot != p1.mugshot True +Bug #9508: Similarly to the previous test, make sure hash() works as expected +(equal items must hash to the same value). +>>> hash(p.mugshot) == hash(p2.mugshot) +True + # Bug #8175: correctly delete files that have been removed off the file system. >>> import os >>> p2 = Person(name="Fred") -- cgit v1.3