Fix all unit tests for contribs
This commit is contained in:
parent
8139fd79c7
commit
541e5a116a
4 changed files with 11 additions and 17 deletions
|
|
@ -2178,10 +2178,16 @@ class TestComms(CommandTest):
|
||||||
|
|
||||||
|
|
||||||
class TestBatchProcess(CommandTest):
|
class TestBatchProcess(CommandTest):
|
||||||
|
"""
|
||||||
|
Test the batch processor.
|
||||||
|
|
||||||
|
"""
|
||||||
|
# there is some sort of issue with the mock; it needs to loaded once to work
|
||||||
|
from evennia.contrib.tutorials.red_button import red_button # noqa
|
||||||
|
|
||||||
@patch("evennia.contrib.tutorials.red_button.red_button.repeat")
|
@patch("evennia.contrib.tutorials.red_button.red_button.repeat")
|
||||||
@patch("evennia.contrib.tutorials.red_button.red_button.delay")
|
@patch("evennia.contrib.tutorials.red_button.red_button.delay")
|
||||||
def test_batch_commands(self, mock_delay, mock_repeat):
|
def test_batch_commands(self, mock_tutorials, mock_repeat):
|
||||||
# cannot test batchcode here, it must run inside the server process
|
# cannot test batchcode here, it must run inside the server process
|
||||||
self.call(
|
self.call(
|
||||||
batchprocess.CmdBatchCommands(),
|
batchprocess.CmdBatchCommands(),
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,5 @@ This sub-package holds Evennia's contributions - code that may be
|
||||||
useful but are deemed too game-specific to go into the core library.
|
useful but are deemed too game-specific to go into the core library.
|
||||||
|
|
||||||
See README.md for more info.
|
See README.md for more info.
|
||||||
"""
|
|
||||||
# imports for apidoc / turned off, due to typeclass-clashes; if imported
|
|
||||||
# like this; Django finds these typeclasses and makes for example Weapon
|
|
||||||
# unavailable to the user to add (since it exists in tutorialworld). We might
|
|
||||||
# need to change all names of contrib typeclasses (name them e.g. ContribTutorialWeapon
|
|
||||||
# or something); For now, we can un-comment this block ONLY for creating apidocs,
|
|
||||||
# but even so, you will get clashes when both using the tutorialworld and your
|
|
||||||
# own code, so somthing needs to be done here. See issue #766. /Griatch
|
|
||||||
|
|
||||||
# import evennia
|
"""
|
||||||
# evennia._init()
|
|
||||||
# import barter, dice, extended_room, menu_login, talking_npc
|
|
||||||
# import chargen, email_login, gendersub, menusystem, slow_exit
|
|
||||||
# import tutorial_world, tutorial_examples
|
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@ Mirror object - Griatch 2015.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import TutorialMirror # noqa
|
from .mirror import TutorialMirror # noqa
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ urlpatterns = [
|
||||||
path("", include("evennia.web.website.urls")),
|
path("", include("evennia.web.website.urls")),
|
||||||
# webclient
|
# webclient
|
||||||
path("webclient/", include("evennia.web.webclient.urls")),
|
path("webclient/", include("evennia.web.webclient.urls")),
|
||||||
# admin
|
# admin -
|
||||||
path("admin/", include("evennia.web.admin.urls")),
|
# path("admin/", include("evennia.web.admin.urls")),
|
||||||
# favicon
|
# favicon
|
||||||
path("favicon.ico", RedirectView.as_view(url="/media/images/favicon.ico", permanent=False)),
|
path("favicon.ico", RedirectView.as_view(url="/media/images/favicon.ico", permanent=False)),
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue