Ejemplo n.º 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.*")
Ejemplo n.º 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")
Ejemplo n.º 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.*")
Ejemplo n.º 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")
Ejemplo n.º 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")
Ejemplo n.º 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.*")