def setUp(self):
        self.router = ResponseRouter()
        # These lambda functions simulate user actions
        self.router.append_read_rule("test1", lambda x, y, z: "1")
        self.router.append_read_rule("test2", lambda x, y, z: "2")
        self.router.append_read_rule("test3.*", lambda x, y, z: "3")
        # These lambda functions simulate user actions
        self.write_action_one = lambda x, y, z, data: "%s_4" % data
        self.write_action_two = lambda x, y, z, data: "%s_5" % data
        self.write_action_three = lambda x, y, z, data: "%s_6" % data

        self.router.append_write_rule("test1", self.write_action_one)
        self.router.append_write_rule("test2", self.write_action_two)
        self.router.append_write_rule("test3.*", self.write_action_three)
dataset/ETHPy150Open dropbox/emmer/tests/test_response_router.py/TestResponseRouter.setUp/original