예제 #1
0
 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)
예제 #2
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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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)