コード例 #1
0
 def test_parse_for_command__VTHelp_only(self):
     msg = "!vthelp"
     cmd = bot.parse_for_command(msg, self.author, 1)
     self.assertEqual(cmd, bot.Commands.VTHELP)
コード例 #2
0
 def test_parse_for_command__VTCT_only(self):
     msg = "!vtct"
     cmd = bot.parse_for_command(msg, self.author, 1)
     self.assertEqual(cmd, bot.Commands.VTCT)
コード例 #3
0
 def test_parse_for_command__VTBan_only(self):
     msg = "!vtban"
     cmd = bot.parse_for_command(msg, self.author, 1)
     self.assertEqual(cmd, bot.Commands.NEEDADMIN)
コード例 #4
0
 def test_parse_for_command__VT_before(self):
     msg = "!vt testing"
     cmd = bot.parse_for_command(msg, self.author, 1)
     self.assertEqual(cmd, bot.Commands.VT)
コード例 #5
0
 def test_parse_for_command__VT_after(self):
     msg = "test !vt"
     cmd = bot.parse_for_command(msg, self.author, 1)
     self.assertEqual(cmd, bot.Commands.NOCOMMAND)
コード例 #6
0
 def test_parse_for_command__VTSilence_after(self):
     msg = "!vtalert test"
     cmd = bot.parse_for_command(msg, self.author, 1)
     self.assertEqual(cmd, bot.Commands.VTALERT)
コード例 #7
0
 def test_parse_for_command__VTSilence_typo(self):
     msg = "!vtsience"
     cmd = bot.parse_for_command(msg, self.author, 1)
     self.assertNotEqual(cmd, bot.Commands.VTSILENCE)