'Make sure that SSL login happens if it is enabled on protected
views instead of showing the login form.'

@skip_unless_lms
@override_settings(FEATURES=FEATURES_WITH_SSL_AUTH_IMMEDIATE_SIGNUP)
def test_default_login_decorator_ssl(self):

    response = self.client.get(reverse('dashboard'), follows=True)
    self.assertEqual(response.status_code, 302)
    self.assertIn(reverse('signin_user'), response['location'])
    response = self.client.get(reverse('dashboard'), follow=True, SSL_CLIENT_S_DN=self.AUTH_DN.format(self.USER_NAME, self.USER_EMAIL))
    self.assertEquals(('http://testserver/dashboard', 302), response.redirect_chain[(-1)])
    self.assertIn(SESSION_KEY, self.client.session)
