def test_handle_method(self): mic = testutils.TestMic() self.plugin.handle("What's the weather like tomorrow?", mic) self.assertEqual(len(mic.outputs), 1) self.assertTrue("can't see that far ahead" in mic.outputs[0] or "Tomorrow" in mic.outputs[0])
def test_handle_method(self): key = 'gmail_password' if key not in self.plugin.profile or not self.plugin.profile[key]: self.skipTest("Gmail password not available") mic = testutils.TestMic() self.plugin.handle("Check my email account!", mic)
def test_handle_method(self): mic = testutils.TestMic(inputs=["Who's there?", "Random response"]) jokes = joke.get_jokes() self.plugin.handle("Tell me a joke.", mic) self.assertEqual(len(mic.outputs), 3) self.assertIn((mic.outputs[1], mic.outputs[2]), jokes)
def test_handle_method(self): mic = testutils.TestMic(inputs=["No."]) self.plugin.handle("Find me some of the top hacker news stories.", mic) self.assertGreater(len(mic.outputs), 1) self.assertIn("current top stories", mic.outputs[1])
def test_handle_method(self): mic = testutils.TestMic() self.plugin.handle("What is the meaning of life?", mic) self.assertEqual(len(mic.outputs), 1) self.assertIn("42", mic.outputs[0])
def test_handle_method(self): mic = testutils.TestMic() self.plugin.handle("How are you?", mic) self.assertEqual(len(mic.outputs), 1)
def test_handle_method(self): mic = testutils.TestMic() self.plugin.handle("What time is it?", mic) self.assertEqual(len(mic.outputs), 1) self.assertIn("It is", mic.outputs[0])