'Expiration test with superusers'

def test_login_expiration_with_superusers(self):

    self.reset.append(conf.AUTH.BACKEND.set_for_testing(['desktop.auth.backend.AllowFirstUserDjangoBackend']))
    self.reset.append(conf.AUTH.EXPIRES_AFTER.set_for_testing(0))
    self.reset.append(conf.AUTH.EXPIRE_SUPERUSERS.set_for_testing(True))
    client = make_logged_in_client(username=self.test_username, password='test')
    client.get('/accounts/logout')
    user = User.objects.get(username=self.test_username)
    user.is_superuser = True
    user.save()
    response = client.post('/accounts/login/', dict(username=self.test_username, password='test'), follow=True)
    assert_equal(200, response.status_code, 'Expected    unauthorized    status.')
