Isolate EvenniaTestCase/EvenniaCommandTest for pristine settings

This commit is contained in:
Griatch 2021-12-22 01:23:03 +01:00
parent 541e5a116a
commit 498a031662
40 changed files with 223 additions and 123 deletions

View file

@ -7,7 +7,7 @@ from evennia.utils.test_resources import EvenniaTest
from .bodyfunctions import BodyFunctions
@patch("evennia.contrib.tutorials.bodyfunctions.random")
@patch("evennia.contrib.tutorials.bodyfunctions.bodyfunctions.random")
class TestBodyFunctions(EvenniaTest):
script_typeclass = BodyFunctions

View file

@ -2,12 +2,12 @@
Tutorial - talking NPC tests.
"""
from evennia.commands.default.tests import CommandTest
from evennia.commands.default.tests import EvenniaCommandTest
from evennia.utils.create import create_object
from . import talking_npc
class TestTalkingNPC(CommandTest):
class TestTalkingNPC(EvenniaCommandTest):
def test_talkingnpc(self):
npc = create_object(talking_npc.TalkingNPC, key="npctalker", location=self.room1)
self.call(talking_npc.CmdTalk(), "", "(You walk up and talk to Char.)")

View file

@ -4,4 +4,4 @@ Tutorial world - Griatch, 2011, 2015
"""
from . import mob, objects, rooms # noqa
from . import mob, objects, rooms, intro_menu # noqa

View file

@ -6,7 +6,7 @@ Test tutorial_world/mob
from mock import patch
from twisted.trial.unittest import TestCase as TwistedTestCase
from twisted.internet.base import DelayedCall
from evennia.commands.default.tests import CommandTest
from evennia.commands.default.tests import EvenniaCommandTest
from evennia.utils.create import create_object
from evennia.utils.test_resources import EvenniaTest, mockdelay, mockdeferLater
from . import mob, objects as tutobjects, rooms as tutrooms
@ -30,7 +30,7 @@ class TestTutorialWorldMob(EvenniaTest):
DelayedCall.debug = True
class TestTutorialWorldObjects(TwistedTestCase, CommandTest):
class TestTutorialWorldObjects(TwistedTestCase, EvenniaCommandTest):
def test_tutorialobj(self):
obj1 = create_object(tutobjects.TutorialObject, key="tutobj")
obj1.reset()
@ -129,7 +129,7 @@ class TestTutorialWorldObjects(TwistedTestCase, CommandTest):
self.call(tutobjects.CmdGetWeapon(), "", "You find Rusty sword.", obj=rack)
class TestTutorialWorldRooms(CommandTest):
class TestTutorialWorldRooms(EvenniaCommandTest):
def test_cmdtutorial(self):
room = create_object(tutrooms.TutorialRoom, key="tutroom")
self.char1.location = room