Skip to content

Commit

Permalink
add a test for SCENE
Browse files Browse the repository at this point in the history
  • Loading branch information
slingamn committed Sep 16, 2020
1 parent 59eb750 commit 0287b83
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions irctest/server_tests/test_roleplay.py
Expand Up @@ -46,6 +46,19 @@ def testRoleplay(self):
self.assertTrue(reply.prefix.startswith('*bilbo*!'))
self.assertIn('too much bread', reply.params[1])

self.sendLine(bar, 'SCENE %s dark and stormy night' % (chan,))
reply = self.getMessages(bar)[0]
self.assertEqual(reply.command, 'PRIVMSG')
self.assertEqual(reply.params[0], chan)
self.assertTrue(reply.prefix.startswith('=Scene=!'))
self.assertIn('dark and stormy night', reply.params[1])

reply = self.getMessages(qux)[0]
self.assertEqual(reply.command, 'PRIVMSG')
self.assertEqual(reply.params[0], chan)
self.assertTrue(reply.prefix.startswith('=Scene=!'))
self.assertIn('dark and stormy night', reply.params[1])

# test history storage
self.sendLine(qux, 'CHATHISTORY LATEST %s * 10' % (chan,))
reply = [msg for msg in self.getMessages(qux) if msg.command == 'PRIVMSG' and 'bilbo' in msg.prefix][0]
Expand Down

0 comments on commit 0287b83

Please sign in to comment.