diff options
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()) |
