def test_next_filter(self): ircbot.FILTERS = [self.h_next, self.h_count] self.assertEquals("5", ircbot.parse("pocet"))
def test_replace_filter(self): ircbot.FILTERS = [self.h_replace, self.h_count] self.assertEquals("7", ircbot.parse("pocet"))
def test_nothing(self): self.assertEquals(None, ircbot.parse("nothing test"))
def test_command(self): ircbot.FILTERS = [] self.assertEquals("echo bot", ircbot.parse("echo bot"))
def test_unknown(self): self.assertEquals("unknown test", ircbot.parse("unknown test"))
def test_echo(self): self.assertEquals("echo bot", ircbot.parse("echo bot"))
def test_no_command_no_filter(self): self.assertEqual(ircbot.parse("foo"), "foo")
def test_f_replace_secret_with_hashes(self): self.assertEqual(ircbot.parse("the secret is secret"), "the ###### is ######") self.assertEqual(ircbot.parse("foo bar"), "foo bar")
def test_cmd_say_hello(self): self.assertEqual(ircbot.parse("hello"), "hello to you too")