Esempio n. 1
0
 def test_logout_first(self):
     logline = "987: logout other_user"
     chain = LoginEvent(LogoutEvent(SessionEvent()))
     expected = {
         "id": "987",
         "type": LogoutEvent.__name__,
         "value": "other_user",
     }
     self.assertDictEqual(chain.process(logline), expected)
Esempio n. 2
0
 def test_no_reception(self):
     logline = "no event can match this log"
     chain = LoginEvent(LogoutEvent(SessionEvent()))
     self.assertIsNone(chain.process(logline))