Add unittests to tutorial world mob, objects and most rooms as per #1105.

This commit is contained in:
Griatch 2017-02-19 23:48:24 +01:00
parent fd4f72f4d0
commit 5a723697e7
4 changed files with 108 additions and 10 deletions

View file

@ -38,7 +38,7 @@ class CommandTest(EvenniaTest):
Tests a command
"""
def call(self, cmdobj, args, msg=None, cmdset=None, noansi=True, caller=None, receiver=None, cmdstring=None):
def call(self, cmdobj, args, msg=None, cmdset=None, noansi=True, caller=None, receiver=None, cmdstring=None, obj=None):
"""
Test a command by assigning all the needed
properties to cmdobj and running
@ -58,7 +58,7 @@ class CommandTest(EvenniaTest):
cmdobj.session = SESSIONS.session_from_sessid(1)
cmdobj.player = self.player
cmdobj.raw_string = cmdobj.key + " " + args
cmdobj.obj = caller if caller else self.char1
cmdobj.obj = obj or (caller if caller else self.char1)
# test
old_msg = receiver.msg
try: