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)
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)
def test_duck_api(self): input = Mock(group=lambda x: 'swhack') duck(self.phenny, input)
def test_search(self): input = Mock(group=lambda x: 'vtluug') duck(self.phenny, input) assert self.phenny.reply.called is True
def test_duck(self): input = Mock(group=lambda x: 'swhack') duck(self.phenny, input) assert self.phenny.reply.called is True