Пример #1
0
 def test_search(self):
     if not (self.engines['DuckDuckGo'] or self.engines['Bing']
             or self.engines['Google']):
         self.skipTest('All search engines are down, skipping test.')
     self.input.group.return_value = 'vtluug'
     duck(self.phenny, self.input)
     self.assertTrue(self.phenny.reply.called)
Пример #2
0
 def test_duck(self):
     if not is_up(self.engines['DuckDuckGo']):
         self.skipTest(self.skip_msg.format('DuckDuckGo'))
     self.input.group.return_value = 'swhack'
     duck(self.phenny, self.input)
     self.assertTrue(self.phenny.reply.called)
Пример #3
0
 def test_duck_api(self):
     input = Mock(group=lambda x: 'swhack')
     duck(self.phenny, input)
Пример #4
0
    def test_search(self):
        input = Mock(group=lambda x: 'vtluug')
        duck(self.phenny, input)

        assert self.phenny.reply.called is True
Пример #5
0
    def test_duck(self):
        input = Mock(group=lambda x: 'swhack')
        duck(self.phenny, input)

        assert self.phenny.reply.called is True