Fix CommandTest to stop if at_pre_cmd should stop execution.

This commit is contained in:
Tehom 2018-04-18 02:26:01 -04:00
parent 6783d5faa0
commit a1ab742587

View file

@ -75,7 +75,8 @@ class CommandTest(EvenniaTest):
returned_msg = "" returned_msg = ""
try: try:
receiver.msg = Mock() receiver.msg = Mock()
cmdobj.at_pre_cmd() if cmdobj.at_pre_cmd():
return
cmdobj.parse() cmdobj.parse()
ret = cmdobj.func() ret = cmdobj.func()
if isinstance(ret, types.GeneratorType): if isinstance(ret, types.GeneratorType):