'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({u'name': u'joe', u'bio': u'Speaking    espa\xf1ol.'})
    f2 = HashTestForm({u'name': u'        joe', u'bio': u'Speaking    espa\xf1ol.        '})
    hash1 = utils.form_hmac(f1)
    hash2 = utils.form_hmac(f2)
    self.assertEqual(hash1, hash2)
