コード例 #1
0
ファイル: test_kiss.py プロジェクト: peterjuras/jabberbot
 def test_run_command_without_args(self):
     mtype, resp = kiss.run_command(None)
     self.assertEqual(mtype, "groupchat")
     self.assertEqual(resp, "Who should I kiss?")
コード例 #2
0
ファイル: test_kiss.py プロジェクト: peterjuras/jabberbot
 def test_run_command_without_two_args(self):
     mtype, resp = kiss.run_command(None, "foo", "bar")
     self.assertEqual(mtype, "groupchat")
     self.assertEqual(resp, "/me kisses foo on the bar :-*")
コード例 #3
0
ファイル: test_kiss.py プロジェクト: peterjuras/jabberbot
 def test_run_command_without_three_arg(self):
     mtype, resp = kiss.run_command(None, "foo", "bar", "hello")
     self.assertEqual(mtype, "groupchat")
     self.assertEqual(resp, "Too many arguments")
コード例 #4
0
ファイル: test_kiss.py プロジェクト: peterjuras/jabberbot
 def test_run_command_without_one_arg(self):
     mtype, resp = kiss.run_command(None, "foo")
     self.assertEqual(mtype, "groupchat")
     self.assertEqual(resp, "/me kisses foo :-*")
コード例 #5
0
 def test_run_command_without_args(self):
     mtype, resp = kiss.run_command(None)
     self.assertEqual(mtype, 'groupchat')
     self.assertEqual(resp, 'Who should I kiss?')
コード例 #6
0
 def test_run_command_without_three_arg(self):
     mtype, resp = kiss.run_command(None, 'foo', 'bar', 'hello')
     self.assertEqual(mtype, 'groupchat')
     self.assertEqual(resp, 'Too many arguments')
コード例 #7
0
 def test_run_command_without_two_args(self):
     mtype, resp = kiss.run_command(None, 'foo', 'bar')
     self.assertEqual(mtype, 'groupchat')
     self.assertEqual(resp, '/me kisses foo on the bar :-*')
コード例 #8
0
 def test_run_command_without_one_arg(self):
     mtype, resp = kiss.run_command(None, 'foo')
     self.assertEqual(mtype, 'groupchat')
     self.assertEqual(resp, '/me kisses foo :-*')