示例#1
0
 def test_slogan(self):
     self.input.group.return_value = 'slogan'
     slogan.slogan(self.phenny, self.input)
     out = self.phenny.say.call_args[0][0]
     if out == '\x15\x03\x01':
         self.skipTest('Server SSL error')
     self.assertRegex(out, ".*slogan.*")
示例#2
0
 def test_slogan_none(self):
     self.input.group.return_value = None
     slogan(self.phenny, self.input)
     self.phenny.say.assert_called_once_with(
         "You need to specify a word; try .slogan Granola")
示例#3
0
 def test_slogan(self):
     self.input.group.return_value = 'slogan'
     slogan(self.phenny, self.input)
     out = self.phenny.say.call_args[0][0]
     self.assertRegex(out, ".*slogan.*")
示例#4
0
    def test_slogan(self):
        input = Mock(group=lambda x: 'slogan')
        slogan(self.phenny, input)
        out = self.phenny.say.call_args[0][0]

        self.assertNotEqual(out, "Looks like an issue with sloganizer.net")
示例#5
0
 def test_slogan_none(self):
     input = Mock(group=lambda x: None)
     slogan(self.phenny, input)
     self.phenny.say.assert_called_once_with(
         "You need to specify a word; try .slogan Granola")
示例#6
0
    def test_slogan(self):
        input = Mock(group=lambda x: 'slogan')
        slogan(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, ".*slogan.*")