'Verify that an inactive session times out and redirects to the
login page'

@override_settings(SESSION_INACTIVITY_TIMEOUT_IN_SECONDS=1)
def test_inactive_session_timeout(self):

    (email, password) = self.STUDENT_INFO[0]
    self.login(email, password)
    resp = self.client.get(reverse('dashboard'))
    self.assertEquals(resp.status_code, 200)
    time.sleep(2)
    resp = self.client.get(reverse('dashboard'))
    self.assertRedirects(resp, ((settings.LOGIN_REDIRECT_URL + '?next=') + reverse('dashboard')))
