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)
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)
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)
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)
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)
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)
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)