'Tests the registration form showing up with the proper parameters.
Uses django test client for its session support'

@unittest.skipUnless(settings.FEATURES.get('AUTH_USE_SHIB'), 'AUTH_USE_SHIB    not    set')
@data(*gen_all_identities())
def test_registration_form(self, identity):

    client = DjangoTestClient()
    response = client.get(path='/shib-login/', data={}, follow=False, **identity)
    self.assertEquals(response.status_code, 200)
    mail_input_html = '<input    class=""    id="email"    type="email"    name="email"'
    if (not identity.get('mail')):
        self.assertContains(response, mail_input_html)
    else:
        self.assertNotContains(response, mail_input_html)
    sn_empty = (not identity.get('sn'))
    given_name_empty = (not identity.get('givenName'))
    displayname_empty = (not identity.get('displayName'))
    fullname_input_html = '<input    id="name"    type="text"    name="name"'
    if (sn_empty and given_name_empty and displayname_empty):
        self.assertContains(response, fullname_input_html)
    else:
        self.assertNotContains(response, fullname_input_html)
