Evadventure commands, some tests
This commit is contained in:
parent
2848e31f4b
commit
de419d94ed
4 changed files with 67 additions and 13 deletions
30
evennia/contrib/tutorials/evadventure/tests/test_commands.py
Normal file
30
evennia/contrib/tutorials/evadventure/tests/test_commands.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
"""
|
||||
Test the EvAdventure commands.
|
||||
|
||||
"""
|
||||
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from evennia.utils.test_resources import BaseEvenniaCommandTest
|
||||
|
||||
from .. import commands
|
||||
from .mixins import EvAdventureMixin
|
||||
|
||||
|
||||
class TestEvAdventureCommands(EvAdventureMixin, BaseEvenniaCommandTest):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
# needed for the .call mechanism
|
||||
self.char1 = self.character
|
||||
|
||||
def test_inventory(self):
|
||||
self.call(
|
||||
commands.CmdInventory(),
|
||||
"inventory",
|
||||
"""
|
||||
You are fighting with your bare fists and have no shield.
|
||||
You wear no armor and no helmet.
|
||||
Backpack is empty.
|
||||
You use 0/11 equipment slots.
|
||||
""".strip(),
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue