# evennia.contrib.base_systems.building_menu.tests

Building menu tests.

class `evennia.contrib.base_systems.building_menu.tests.``Submenu`(caller=None, obj=None, title='Building menu: {obj}', keys=None, parents=None, persistent=False)

  Bases: `evennia.contrib.base_systems.building_menu.building_menu.BuildingMenu`

  `init`(exit)

    Create the sub-menu to edit the specified object.

    Parameters

      obj (Object) – the object to edit.

    Note

    This method is probably to be overridden in your subclasses. Use add_choice and its variants to create menu choices.

class `evennia.contrib.base_systems.building_menu.tests.``TestBuildingMenu`(methodName='runTest')

  Bases: `evennia.utils.test_resources.BaseEvenniaCommandTest`

  `setUp`()

    Sets up testing environment

  `test_quit`()

    Try to quit the building menu.

  `test_setattr`()

    Test the simple setattr provided by building menus.

  `test_add_choice_without_key`()

    Try to add choices without keys.

  `test_callbacks`()

    Test callbacks in menus.

  `test_multi_level`()

    Test multi-level choices.

  `test_submenu`()

    Test to add sub-menus.