evennia.contrib.base_systems.components.tests

class evennia.contrib.base_systems.components.tests.ComponentTestA(host=None)[source]

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.

host
class evennia.contrib.base_systems.components.tests.ShadowedComponentTestA(host=None)[source]

Bases: evennia.contrib.base_systems.components.tests.ComponentTestA

name = 'shadowed_test_a'
slot = 'ic_a'
host
class evennia.contrib.base_systems.components.tests.InheritedComponentTestA(host=None)[source]

Bases: evennia.contrib.base_systems.components.tests.ComponentTestA

name = 'inherited_test_a'
slot = 'ic_a'
my_other_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.

host
class evennia.contrib.base_systems.components.tests.ReplacementComponentTestA(host=None)[source]

Bases: evennia.contrib.base_systems.components.tests.InheritedComponentTestA

name = 'replacement_inherited_test_a'
slot = 'ic_a'
replacement_field

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.

host
class evennia.contrib.base_systems.components.tests.ComponentTestB(host=None)[source]

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.

host
class evennia.contrib.base_systems.components.tests.RuntimeComponentTestC(host=None)[source]

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.

host
class evennia.contrib.base_systems.components.tests.ComponentTestD(host=None)[source]

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

name = 'test_d'
mixed_in

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.

host
class evennia.contrib.base_systems.components.tests.ShadowedCharacterMixin[source]

Bases: object

ic_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

class evennia.contrib.base_systems.components.tests.CharacterMixinWithComponents[source]

Bases: object

ic_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_d

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

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)[source]

Bases: evennia.contrib.base_systems.components.holder.ComponentHolderMixin, evennia.contrib.base_systems.components.tests.ShadowedCharacterMixin, evennia.contrib.base_systems.components.tests.CharacterMixinWithComponents, 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

ic_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

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.InheritedTCWithComponents(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)[source]

Bases: evennia.contrib.base_systems.components.tests.CharacterWithComponents

test_c

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.contrib.base_systems.components.tests.CharacterWithComponents.DoesNotExist

exception MultipleObjectsReturned

Bases: evennia.contrib.base_systems.components.tests.CharacterWithComponents.MultipleObjectsReturned

path = 'evennia.contrib.base_systems.components.tests.InheritedTCWithComponents'
typename = 'InheritedTCWithComponents'
class evennia.contrib.base_systems.components.tests.TestComponents(methodName='runTest')[source]

Bases: evennia.utils.test_resources.EvenniaTest

character_typeclass

alias of CharacterWithComponents

test_character_has_class_components()[source]
test_character_components_set_fields_properly()[source]
test_inherited_typeclass_does_not_include_child_class_components()[source]
test_character_instances_components_properly()[source]
test_character_assigns_default_value()[source]
test_character_assigns_default_provided_values()[source]
test_character_has_autocreated_values()[source]
test_component_inheritance_properly_overrides_slots()[source]
test_component_inheritance_assigns_proper_values()[source]
test_host_mixins_assigns_components()[source]
test_character_can_register_runtime_component()[source]
test_handler_can_add_default_component()[source]
test_handler_has_returns_true_for_any_components()[source]
test_can_remove_component()[source]
test_can_remove_component_by_name()[source]
test_cannot_replace_component()[source]
test_can_get_component()[source]
test_can_access_component_regular_get()[source]
test_returns_none_with_regular_get_when_no_attribute()[source]
test_host_has_class_component_tags()[source]
test_host_has_added_component_tags()[source]
test_host_has_added_default_component_tags()[source]
test_host_remove_component_tags()[source]
test_host_remove_by_name_component_tags()[source]
test_component_tags_only_hold_one_value_when_enforce_single()[source]
test_component_tags_default_value_is_overridden_when_enforce_single()[source]
test_component_tags_support_multiple_values_by_default()[source]
test_mutables_are_not_shared_when_autocreate()[source]
test_replacing_class_component_slot_with_runtime_component()[source]
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)[source]

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

my_signal()[source]
my_other_signal()[source]
my_response()[source]
my_other_response()[source]
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)[source]

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

name = 'test_signal_a'
my_signal()[source]
my_other_signal()[source]
my_response()[source]
my_other_response()[source]
my_component_response()[source]
host
class evennia.contrib.base_systems.components.tests.TestComponentSignals(methodName='runTest')[source]

Bases: evennia.utils.test_resources.BaseEvenniaTest

setUp()[source]

Sets up testing environment

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