def METHOD_NAME(self):
    """Test to add sub-menus."""
    def open_exit(menu):
        menu.open_submenu("evennia.contrib.base_systems.building_menu.tests.Submenu", self.exit)
        return False
    self.menu.add_choice("exit", key="x", on_enter=open_exit)
    self.menu.open()
    self.call(CmdNoMatch(building_menu=self.menu), "x")
    self.menu = self.char1.ndb._building_menu
    self.call(CmdNoMatch(building_menu=self.menu), "t")
    self.call(CmdNoMatch(building_menu=self.menu), "in")
    self.call(CmdNoMatch(building_menu=self.menu), "@")
    self.call(CmdNoMatch(building_menu=self.menu), "@")
    self.menu = self.char1.ndb._building_menu
    self.assertEqual(self.char1.ndb._building_menu.obj, self.room1)
    self.call(CmdNoMatch(building_menu=self.menu), "q")
    self.assertEqual(self.exit.key, "in")