evennia.contrib.game_systems.crafting.tests

Unit tests for the crafting system contrib.

class evennia.contrib.game_systems.crafting.tests.TestCraftUtils(methodName='runTest')[source]

Bases: evennia.utils.test_resources.BaseEvenniaTestCase

Test helper utils for crafting.

maxDiff = None
test_load_recipes()[source]

This should only load the example module now

class evennia.contrib.game_systems.crafting.tests.TestCraftingRecipeBase(methodName='runTest')[source]

Bases: evennia.utils.test_resources.BaseEvenniaTestCase

Test the parent recipe class.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_msg()[source]

Test messaging to crafter

test_pre_craft()[source]

Test validating hook

test_pre_craft_fail()[source]

Should rase error if validation fails

test_craft_hook__succeed()[source]

Test craft hook, the main access method.

test_craft_hook__fail()[source]

Test failing the call

class evennia.contrib.game_systems.crafting.tests.TestCraftingRecipe(methodName='runTest')[source]

Bases: evennia.utils.test_resources.BaseEvenniaTestCase

Test the CraftingRecipe class with one recipe

maxDiff = None
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_error_format()[source]

Test the automatic error formatter

test_craft__success()[source]

Test to create a result from the recipe

test_seed__success()[source]

Test seed helper classmethod

test_craft_missing_tool__fail()[source]

Fail craft by missing tool2

test_craft_missing_cons__fail()[source]

Fail craft by missing cons3

test_craft_missing_cons__always_consume__fail()[source]

Fail craft by missing cons3, with always-consume flag

test_craft_wrong_tool__fail()[source]

Fail craft by including a wrong tool

test_craft_tool_excess__fail()[source]

Fail by too many consumables

test_craft_cons_excess__fail()[source]

Fail by too many consumables

test_craft_tool_excess__sucess()[source]

Allow too many consumables

test_craft_cons_excess__sucess()[source]

Allow too many consumables

test_craft_tool_order__fail()[source]

Strict tool-order recipe fail

test_craft_cons_order__fail()[source]

Strict tool-order recipe fail

class evennia.contrib.game_systems.crafting.tests.TestCraftSword(methodName='runTest')[source]

Bases: evennia.utils.test_resources.BaseEvenniaTestCase

Test the craft function by crafting the example sword.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_craft_sword(mockrandom)[source]

Craft example sword. For the test, every crafting works.

class evennia.contrib.game_systems.crafting.tests.TestCraftCommand(methodName='runTest')[source]

Bases: evennia.utils.test_resources.BaseEvenniaCommandTest

Test the crafting command

setUp()[source]

Sets up testing environment

test_craft__success()[source]

Successfully craft using command

test_craft__notools__failure()[source]

Craft fail no tools

test_craft__nocons__failure()[source]
test_craft__unknown_recipe__failure()[source]