'Test contrib.formtools.preview form submittal.
Use the client library to POST to the form with stage set to 3
to see if our forms done() method is called. Check first
without the security hash, verify failure, retry with security
hash and verify sucess.'

def test_form_submit(self):

    self.test_data.update({'stage': 2})
    response = self.client.post('/test1/', self.test_data)
    self.failIfEqual(response.content, success_string)
    hash = self.preview.security_hash(None, TestForm(self.test_data))
    self.test_data.update({'hash': hash})
    response = self.client.post('/test1/', self.test_data)
    self.assertEqual(response.content, success_string)
