'Regression test for #10034: the hash generation function should ignore
leading/trailing whitespace so as to be friendly to broken browsers that
submit it (usually in textareas).'

def test_textfield_hash(self):

    f1 = HashTestForm({'name': 'joe', 'bio': 'Nothing    notable.'})
    f2 = HashTestForm({'name': '        joe', 'bio': 'Nothing    notable.        '})
    hash1 = utils.security_hash(None, f1)
    hash2 = utils.security_hash(None, f2)
    self.assertEqual(hash1, hash2)
