def test_action_handler(self):
        handler = ActionHandler()
        handler.redis_conn = MagicMock()
        handler.redis_conn.set = MagicMock(side_effect=AssertionError("added"))

        valid = {
            "uuid": "abaksdjb",
            "crawlid": "abc124",
            "appid": "testapp",
            "spiderid": "link",
            "action": "info",
        }

        try:
            handler.handle(valid)
            self.fail("Added not called")
        except __HOLE__ as e:
            self.assertEquals("added", e.message)
dataset/ETHPy150Open istresearch/scrapy-cluster/kafka-monitor/tests/tests_offline.py/TestPlugins.test_action_handler