diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2011-03-30 17:35:12 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2011-03-30 17:35:12 +0000 |
| commit | 5fa11b00352ec14c30a1eeea1377339adc8fc3ff (patch) | |
| tree | f6c50beef6e844c1f8e6ec64c685f41a198a47a0 /tests | |
| parent | c922a046755db20d08c714b469503d3dcb5e0dfc (diff) | |
Removed Django 1.2 compatibility fallback for contrib.comments forms hash.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/comment_tests/tests/comment_form_tests.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/regressiontests/comment_tests/tests/comment_form_tests.py b/tests/regressiontests/comment_tests/tests/comment_form_tests.py index 956ca53bfd..2c5e1fe551 100644 --- a/tests/regressiontests/comment_tests/tests/comment_form_tests.py +++ b/tests/regressiontests/comment_tests/tests/comment_form_tests.py @@ -1,4 +1,3 @@ -import hashlib import time from django.conf import settings @@ -46,23 +45,6 @@ class CommentFormTests(CommentTestCase): def testObjectPKTampering(self): self.tamperWithForm(object_pk="3") - def testDjango12Hash(self): - # Ensure we can use the hashes generated by Django 1.2 - a = Article.objects.get(pk=1) - d = self.getValidData(a) - - content_type = d['content_type'] - object_pk = d['object_pk'] - timestamp = d['timestamp'] - - # The Django 1.2 method hard-coded here: - info = (content_type, object_pk, timestamp, settings.SECRET_KEY) - security_hash = hashlib.sha1("".join(info)).hexdigest() - - d['security_hash'] = security_hash - f = CommentForm(a, data=d) - self.assertTrue(f.is_valid(), f.errors) - def testSecurityErrors(self): f = self.tamperWithForm(honeypot="I am a robot") self.assertTrue("honeypot" in f.security_errors()) |
