def test_expiration_disabled_with_zero_max(self): expiration_length = get_session_timeout( self.social_user, enable_session_expiration=False, max_session_length=0 ) self.assertEqual(expiration_length, 0)
def test_expiration_disabled_no_max(self): self.set_user_expiration(60) expiration_length = get_session_timeout( self.social_user, enable_session_expiration=False ) self.assertIsNone(expiration_length)
def test_user_has_no_session_length_with_max(self): expiration_length = get_session_timeout( self.social_user, enable_session_expiration=True, max_session_length=60 ) self.assertEqual(expiration_length, 60)
def test_user_has_session_length_no_max(self): self.set_user_expiration(60) expiration_length = get_session_timeout( self.social_user, enable_session_expiration=True ) self.assertEqual(expiration_length, 60)
def test_user_has_no_session_length_no_max(self): expiration_length = get_session_timeout( self.social_user, enable_session_expiration=True ) self.assertIsNone(expiration_length)