# evennia.contrib.base_systems.components.tests

class `evennia.contrib.base_systems.components.tests.``ComponentTestA`(host=None)

  Bases: `evennia.contrib.base_systems.components.component.Component`

  `name` = 'test_a'
  `my_int`

    Component Attribute Descriptor. Allows you to set attributes related to a component on the class. It uses AttributeProperty under the hood but prefixes the key with the component name.

  `my_list`

    Component Attribute Descriptor. Allows you to set attributes related to a component on the class. It uses AttributeProperty under the hood but prefixes the key with the component name.

class `evennia.contrib.base_systems.components.tests.``ComponentTestB`(host=None)

  Bases: `evennia.contrib.base_systems.components.component.Component`

  `name` = 'test_b'
  `my_int`

    Component Attribute Descriptor. Allows you to set attributes related to a component on the class. It uses AttributeProperty under the hood but prefixes the key with the component name.

  `my_list`

    Component Attribute Descriptor. Allows you to set attributes related to a component on the class. It uses AttributeProperty under the hood but prefixes the key with the component name.

  `default_tag`

    Component Tags Descriptor. Allows you to set Tags related to a component on the class. The tags are set with a prefixed category, so it can support multiple tags or enforce a single one.

    Default value of a tag is added when the component is registered. Tags are removed if the component itself is removed.

  `single_tag`

    Component Tags Descriptor. Allows you to set Tags related to a component on the class. The tags are set with a prefixed category, so it can support multiple tags or enforce a single one.

    Default value of a tag is added when the component is registered. Tags are removed if the component itself is removed.

  `multiple_tags`

    Component Tags Descriptor. Allows you to set Tags related to a component on the class. The tags are set with a prefixed category, so it can support multiple tags or enforce a single one.

    Default value of a tag is added when the component is registered. Tags are removed if the component itself is removed.

  `default_single_tag`

    Component Tags Descriptor. Allows you to set Tags related to a component on the class. The tags are set with a prefixed category, so it can support multiple tags or enforce a single one.

    Default value of a tag is added when the component is registered. Tags are removed if the component itself is removed.

class `evennia.contrib.base_systems.components.tests.``RuntimeComponentTestC`(host=None)

  Bases: `evennia.contrib.base_systems.components.component.Component`

  `name` = 'test_c'
  `my_int`

    Component Attribute Descriptor. Allows you to set attributes related to a component on the class. It uses AttributeProperty under the hood but prefixes the key with the component name.

  `my_dict`

    Component Attribute Descriptor. Allows you to set attributes related to a component on the class. It uses AttributeProperty under the hood but prefixes the key with the component name.

  `added_tag`

    Component Tags Descriptor. Allows you to set Tags related to a component on the class. The tags are set with a prefixed category, so it can support multiple tags or enforce a single one.

    Default value of a tag is added when the component is registered. Tags are removed if the component itself is removed.

class `evennia.contrib.base_systems.components.tests.``CharacterWithComponents`(id, db_key, db_typeclass_path, db_date_created, db_lock_storage, db_account, db_sessid, db_location, db_home, db_destination, db_cmdset_storage)

  Bases: `evennia.contrib.base_systems.components.holder.ComponentHolderMixin`, `evennia.objects.objects.DefaultCharacter`

  `test_a`

    This allows you to register a component on a typeclass. Components registered with this property are automatically added to any instance of this typeclass.

    Defaults can be overridden for this typeclass by passing kwargs

  `test_b`

    This allows you to register a component on a typeclass. Components registered with this property are automatically added to any instance of this typeclass.

    Defaults can be overridden for this typeclass by passing kwargs

  exception `DoesNotExist`

    Bases: `evennia.objects.objects.DefaultCharacter.DoesNotExist`

  exception `MultipleObjectsReturned`

    Bases: `evennia.objects.objects.DefaultCharacter.MultipleObjectsReturned`

  `path` = 'evennia.contrib.base_systems.components.tests.CharacterWithComponents'
  `typename` = 'CharacterWithComponents'

class `evennia.contrib.base_systems.components.tests.``TestComponents`(methodName='runTest')

  Bases: `evennia.utils.test_resources.EvenniaTest`

  `character_typeclass`

    alias of `CharacterWithComponents`

  `test_character_has_class_components`()
  `test_character_instances_components_properly`()
  `test_character_assigns_default_value`()
  `test_character_assigns_default_provided_values`()
  `test_character_can_register_runtime_component`()
  `test_handler_can_add_default_component`()
  `test_handler_has_returns_true_for_any_components`()
  `test_can_remove_component`()
  `test_can_remove_component_by_name`()
  `test_cannot_replace_component`()
  `test_can_get_component`()
  `test_can_access_component_regular_get`()
  `test_returns_none_with_regular_get_when_no_attribute`()
  `test_host_has_class_component_tags`()
  `test_host_has_added_component_tags`()
  `test_host_has_added_default_component_tags`()
  `test_host_remove_component_tags`()
  `test_host_remove_by_name_component_tags`()
  `test_component_tags_only_hold_one_value_when_enforce_single`()
  `test_component_tags_default_value_is_overridden_when_enforce_single`()
  `test_component_tags_support_multiple_values_by_default`()

class `evennia.contrib.base_systems.components.tests.``CharWithSignal`(id, db_key, db_typeclass_path, db_date_created, db_lock_storage, db_account, db_sessid, db_location, db_home, db_destination, db_cmdset_storage)

  Bases: `evennia.contrib.base_systems.components.holder.ComponentHolderMixin`, `evennia.objects.objects.DefaultCharacter`

  `my_signal`()
  `my_other_signal`()
  `my_response`()
  `my_other_response`()
  exception `DoesNotExist`

    Bases: `evennia.objects.objects.DefaultCharacter.DoesNotExist`

  exception `MultipleObjectsReturned`

    Bases: `evennia.objects.objects.DefaultCharacter.MultipleObjectsReturned`

  `path` = 'evennia.contrib.base_systems.components.tests.CharWithSignal'
  `typename` = 'CharWithSignal'

class `evennia.contrib.base_systems.components.tests.``ComponentWithSignal`(host=None)

  Bases: `evennia.contrib.base_systems.components.component.Component`

  `name` = 'test_signal_a'
  `my_signal`()
  `my_other_signal`()
  `my_response`()
  `my_other_response`()
  `my_component_response`()

class `evennia.contrib.base_systems.components.tests.``TestComponentSignals`(methodName='runTest')

  Bases: `evennia.utils.test_resources.BaseEvenniaTest`

  `setUp`()

    Sets up testing environment

  `test_host_can_register_as_listener`()
  `test_host_can_register_as_responder`()
  `test_component_can_register_as_listener`()
  `test_component_can_register_as_responder`()
  `test_signals_can_add_listener`()
  `test_signals_can_add_responder`()
  `test_signals_can_remove_listener`()
  `test_signals_can_remove_responder`()
  `test_signals_can_trigger_with_args`()
  `test_signals_can_query_with_args`()
  `test_signals_trigger_does_not_fail_without_listener`()
  `test_signals_query_does_not_fail_wihout_responders`()
  `test_signals_query_with_aggregate`()
  `test_signals_can_add_object_listeners_and_responders`()
  `test_signals_can_remove_object_listeners_and_responders`()
  `test_component_handler_signals_connected_when_adding_default_component`()
  `test_component_handler_signals_disconnected_when_removing_component`()
  `test_component_handler_signals_disconnected_when_removing_component_by_name`()