MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / test_session_event_callback_fires

Function test_session_event_callback_fires

tests/test_irc_dpi.py:140–146  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

138
139
140def test_session_event_callback_fires(parser):
141 events = []
142 parser._on_event = lambda sess, msg: events.append((sess.client_ip, msg.command))
143 _feed(parser, '10.0.0.1', '10.0.0.2', 4000, 6667, 1.0,
144 "NICK x\r\nJOIN #y\r\n")
145 cmds = [e[1] for e in events]
146 assert 'NICK' in cmds and 'JOIN' in cmds
147
148
149def test_clear_resets_state(parser):

Callers

nothing calls this directly

Calls 2

_feedFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected