Beispiel #1
0
 def test_removeNonexistentSession(self):
     """
     L{PersistentSessionWrapper.removeSessionWithKey} does nothing if the
     session does not exist.
     """
     store = Store()
     resource = PersistentSessionWrapper(store, None)
     resource.removeSessionWithKey(b'key')
Beispiel #2
0
 def test_removeNonexistentSession(self):
     """
     L{PersistentSessionWrapper.removeSessionWithKey} does nothing if the
     session does not exist.
     """
     store = Store()
     resource = PersistentSessionWrapper(store, None)
     resource.removeSessionWithKey(b'key')
Beispiel #3
0
 def test_removeSession(self):
     """
     L{PersistentSessionWrapper.removeSessionWithKey} removes an existing
     session with the given key.
     """
     store = Store()
     resource = PersistentSessionWrapper(store, None)
     resource.createSessionForKey(b'key', b'username@domain')
     self.assertEqual(store.query(PersistentSession).count(), 1)
     resource.removeSessionWithKey(b'key')
     self.assertEqual(store.query(PersistentSession).count(), 0)
Beispiel #4
0
 def test_removeSession(self):
     """
     L{PersistentSessionWrapper.removeSessionWithKey} removes an existing
     session with the given key.
     """
     store = Store()
     resource = PersistentSessionWrapper(store, None)
     resource.createSessionForKey(b'key', b'username@domain')
     self.assertEqual(store.query(PersistentSession).count(), 1)
     resource.removeSessionWithKey(b'key')
     self.assertEqual(store.query(PersistentSession).count(), 0)