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