Clean up all test suites

This commit is contained in:
Griatch 2022-01-07 16:12:12 +01:00
parent 0f3b96886c
commit 19f920b6d4
41 changed files with 237 additions and 169 deletions

View file

@ -3,12 +3,12 @@ Tests for the bodyfunctions.
"""
from mock import Mock, patch
from evennia.utils.test_resources import EvenniaTest
from evennia.utils.test_resources import BaseEvenniaTest
from .bodyfunctions import BodyFunctions
@patch("evennia.contrib.tutorials.bodyfunctions.bodyfunctions.random")
class TestBodyFunctions(EvenniaTest):
class TestBodyFunctions(BaseEvenniaTest):
script_typeclass = BodyFunctions
def setUp(self):

View file

@ -65,7 +65,8 @@ def info2(caller):
def info3(caller):
text = "'Well ... I'm sort of busy so, have to go. NPC business. Important stuff. You wouldn't understand.'"
text = ("'Well ... I'm sort of busy so, have to go. NPC business. "
"Important stuff. You wouldn't understand.'")
options = (
{"desc": "Oookay ... I won't keep you. Bye.", "goto": "END"},
@ -112,7 +113,8 @@ class CmdTalk(default_cmds.MuxCommand):
# Initiate the menu. Change this if you are putting this on
# some other custom NPC class.
EvMenu(self.caller, "evennia.contrib.tutorials.talking_npc", startnode="menu_start_node")
EvMenu(self.caller, "evennia.contrib.tutorials.talking_npc.talking_npc",
startnode="menu_start_node")
class TalkingCmdSet(CmdSet):

View file

@ -8,11 +8,11 @@ from twisted.trial.unittest import TestCase as TwistedTestCase
from twisted.internet.base import DelayedCall
from evennia.commands.default.tests import EvenniaCommandTest
from evennia.utils.create import create_object
from evennia.utils.test_resources import EvenniaTest, mockdelay, mockdeferLater
from evennia.utils.test_resources import BaseEvenniaTest, mockdelay, mockdeferLater
from . import mob, objects as tutobjects, rooms as tutrooms
class TestTutorialWorldMob(EvenniaTest):
class TestTutorialWorldMob(BaseEvenniaTest):
def test_mob(self):
mobobj = create_object(mob.Mob, key="mob")
self.assertEqual(mobobj.db.is_dead, True)