Refactor all test classes into evennia.utils.test_resources. Update docs.
This commit is contained in:
parent
7912351e01
commit
bbf45af2dd
28 changed files with 528 additions and 588 deletions
|
|
@ -6,7 +6,7 @@ Testing of ExtendedRoom contrib
|
|||
import datetime
|
||||
from mock import patch, Mock
|
||||
from django.conf import settings
|
||||
from evennia.commands.default.tests import EvenniaCommandTest
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.objects.objects import DefaultRoom
|
||||
from . import extended_room
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ class ForceUTCDatetime(datetime.datetime):
|
|||
@patch("evennia.contrib.grid.extended_room.extended_room.datetime.datetime", ForceUTCDatetime)
|
||||
# mock gametime to return April 9, 2064, at 21:06 (spring evening)
|
||||
@patch("evennia.utils.gametime.gametime", new=Mock(return_value=2975000766))
|
||||
class TestExtendedRoom(EvenniaCommandTest):
|
||||
class TestExtendedRoom(BaseEvenniaCommandTest):
|
||||
room_typeclass = extended_room.ExtendedRoom
|
||||
DETAIL_DESC = "A test detail."
|
||||
SPRING_DESC = "A spring description."
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Test map builder.
|
|||
|
||||
"""
|
||||
|
||||
from evennia.commands.default.tests import EvenniaCommandTest
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from . import mapbuilder
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
|
@ -187,7 +187,7 @@ EXAMPLE2_LEGEND = {
|
|||
}
|
||||
|
||||
|
||||
class TestMapBuilder(EvenniaCommandTest):
|
||||
class TestMapBuilder(BaseEvenniaCommandTest):
|
||||
def test_cmdmapbuilder(self):
|
||||
self.call(
|
||||
mapbuilder.CmdMapBuilder(),
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ Tests of simpledoor.
|
|||
"""
|
||||
|
||||
|
||||
from evennia.commands.default.tests import EvenniaCommandTest
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from . import simpledoor
|
||||
|
||||
|
||||
class TestSimpleDoor(EvenniaCommandTest):
|
||||
class TestSimpleDoor(BaseEvenniaCommandTest):
|
||||
def test_cmdopen(self):
|
||||
self.call(
|
||||
simpledoor.CmdOpen(),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Slow exit tests.
|
|||
"""
|
||||
|
||||
from mock import Mock, patch
|
||||
from evennia.commands.default.tests import EvenniaCommandTest
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils.create import create_object
|
||||
from . import slow_exit
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ def _cancellable_mockdelay(time, callback, *args, **kwargs):
|
|||
return Mock()
|
||||
|
||||
|
||||
class TestSlowExit(EvenniaCommandTest):
|
||||
class TestSlowExit(BaseEvenniaCommandTest):
|
||||
@patch("evennia.utils.delay", _cancellable_mockdelay)
|
||||
def test_exit(self):
|
||||
exi = create_object(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue