def test_valid_form(self):
        form = dict(username='******', password='******', password2='123456')
        status = dict(status_code=1, message='')

        try:
            validate_form(form)
        except FormValidationError, e:
            status['status_code'] = e.args[0]
            status['status_message'] = e.args[1]
    def test_to_short_username(self):
        form = dict(username='******', password='******', password2='13')
        status = dict(status_code=1, message='')

        try:
            validate_form(form)
        except FormValidationError, e:
            status['status_code'] = e.args[0]
            status['status_message'] = e.args[1]