Skip to content

Commit

Permalink
Add test capturing that sending a message prefixed with '/me' does ge…
Browse files Browse the repository at this point in the history
…t logged. Ref #75.

Also remove 'on_action' which appears to have no effect.
  • Loading branch information
jaraco committed Jun 30, 2023
1 parent 7e824df commit 0656b85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pmxbot/irc.py
Expand Up @@ -188,8 +188,6 @@ def on_privmsg(self, connection, event):
channel = nick
self.handle_action(channel, nick, msg)

on_action = on_privmsg

def on_invite(self, connection, event):
nick = event.source.nick
channel = event.arguments[0]
Expand Down
4 changes: 4 additions & 0 deletions tests/functional/test_logging.py
Expand Up @@ -108,3 +108,7 @@ def test_onespace_input_notlogged(self):
self.client.send_message("#inane", ' ')
time.sleep(1)
assert self.bot.poll() is None

def test_action(self):
self.client.send_message("#logged", '/me initiates an action')
assert self.check_logs(channel='#logged', message='/me initiates an action')

0 comments on commit 0656b85

Please sign in to comment.