예제 #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)
예제 #2
0
 def test_no_reception(self):
     logline = "no event can match this log"
     chain = LoginEvent(LogoutEvent(SessionEvent()))
     self.assertIsNone(chain.process(logline))