Esempio n. 1
0
 def test_next_filter(self):
     ircbot.FILTERS = [self.h_next, self.h_count]
     self.assertEquals("5", ircbot.parse("pocet"))
Esempio n. 2
0
 def test_replace_filter(self):
     ircbot.FILTERS = [self.h_replace, self.h_count]
     self.assertEquals("7", ircbot.parse("pocet"))
Esempio n. 3
0
 def test_nothing(self):
     self.assertEquals(None, ircbot.parse("nothing test"))
Esempio n. 4
0
 def test_command(self):
     ircbot.FILTERS = []
     self.assertEquals("echo bot", ircbot.parse("echo bot"))
Esempio n. 5
0
 def test_unknown(self):
     self.assertEquals("unknown test", ircbot.parse("unknown test"))
Esempio n. 6
0
 def test_echo(self):
     self.assertEquals("echo bot", ircbot.parse("echo bot"))
Esempio n. 7
0
	def test_no_command_no_filter(self):
		self.assertEqual(ircbot.parse("foo"), "foo")
Esempio n. 8
0
	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")
Esempio n. 9
0
	def test_cmd_say_hello(self):
		self.assertEqual(ircbot.parse("hello"), "hello to you too")