'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):

    self.create_account(self.username, self.email, self.pw)
    self.activate_user(self.email)
    self.login(self.email, self.pw)
    course_url = '/home/'
    resp = self.client.get_html(course_url)
    self.assertEquals(resp.status_code, 200)
    time.sleep(2)
    resp = self.client.get_html(course_url)
    self.assertRedirects(resp, (settings.LOGIN_REDIRECT_URL + '?next=/home/'))
