async def test_parse_regex_insensitive(self): with OpsDroid() as opsdroid: regex = r"Hello .*" mock_connector = Connector({}, opsdroid=opsdroid) mock_connector.respond = amock.CoroutineMock() skill = await self.getMockSkill() opsdroid.skills.append(match_regex(regex, case_sensitive=False)(skill)) message = Message("user", "default", mock_connector, "HELLO world") tasks = await opsdroid.parse(message) for task in tasks: await task self.assertTrue(mock_connector.respond.called)
def test_respond(self): connector = Connector({}) with self.assertRaises(NotImplementedError): self.loop.run_until_complete(connector.respond({}))