def test_registration(self):
     form = RegistrationForm()
     html = form.as_div()
     for name, field in form.fields.items():
         # Terms is not rendered as part of the form html method
         if field.required and name is not "terms":
             self.assertIn("*", field.label)
             self.assertIn(field.label, html)
 def test_high_security_state(self):
     form = RegistrationForm(data={}, security="high")
     self.assertFalse(form.is_valid())
     self.assertIn("<li>Your password can&#39;t be too similar to your " \
     "other personal information.</li><li>Your password must contain at " \
     "least 8 characters.</li><li>Your password can&#39;t be a commonly " \
     "used password.</li><li>Your password can&#39;t be entirely numeric." \
     "</li><li>The password must contain at least one uppercase letter, " \
     "one lowercase one, a digit and special character.</li>", form.as_div())