Exemple #1
0
    def test_none(self):
        word = '__no_word_here__'
        input = Mock(group=lambda x: word)
        urbandict(self.phenny, input)

        self.phenny.say.assert_called_once_with('No results found for '\
                '{0}'.format(word))
Exemple #2
0
 def test_result(self):
     word = 'slemp'
     self.input.group.return_value = word
     urbandict.urbandict(self.phenny, self.input)
     out = self.phenny.say.call_args[0][0]
     m = re.match('^.* - http://www\.urbandictionary\.com/define\.php\?term=.*$',
                  out, flags=re.UNICODE)
     self.assertTrue(m)
Exemple #3
0
    def test_result(self):
        word = 'slemp'
        input = Mock(group=lambda x: word)
        urbandict(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^.* - '\
                'http://www\.urbandictionary\.com/define\.php\?term=.*$', out,
                flags=re.UNICODE)
        self.assertTrue(m)
 def test_none(self):
     word = '__no_word_here__'
     self.input.group.return_value = word
     urbandict(self.phenny, self.input)
     self.phenny.say.assert_called_once_with(
         'No results found for {0}'.format(word))
Exemple #5
0
 def test_none(self):
     word = '__no_word_here__'
     self.input.group.return_value = word
     urbandict.urbandict(self.phenny, self.input)
     self.phenny.say.assert_called_once_with('No results found for {0}'.format(word))