Start documenting evadventure
This commit is contained in:
parent
080db7092c
commit
2a62cc427a
27 changed files with 1164 additions and 77 deletions
34
evennia/contrib/tutorials/evadventure/tests/test_utils.py
Normal file
34
evennia/contrib/tutorials/evadventure/tests/test_utils.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"""
|
||||
Tests of the utils module.
|
||||
|
||||
"""
|
||||
|
||||
from evennia.utils import create
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from .. import utils
|
||||
from ..objects import EvAdventureObject
|
||||
|
||||
|
||||
class TestUtils(BaseEvenniaTest):
|
||||
def test_get_obj_stats(self):
|
||||
|
||||
obj = create.create_object(
|
||||
EvAdventureObject, key="testobj", attributes=(("desc", "A test object"),)
|
||||
)
|
||||
result = utils.get_obj_stats(obj)
|
||||
|
||||
self.assertEqual(
|
||||
result,
|
||||
"""
|
||||
|ctestobj|n
|
||||
Value: ~|y0|n coins
|
||||
|
||||
A test object
|
||||
|
||||
Slots: |w1|n, Used from: |wbackpack|n
|
||||
Quality: |wN/A|n, Uses: |wuses|n
|
||||
Attacks using |wNo attack|n against |wNo defense|n
|
||||
Damage roll: |wNone|n
|
||||
""".strip(),
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue