Fix all unit tests for contribs

This commit is contained in:
Griatch 2021-12-19 20:39:46 +01:00
parent 5dc5dfb7a8
commit f79d88e6cd
4 changed files with 11 additions and 17 deletions

View file

@ -2178,10 +2178,16 @@ class TestComms(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.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
self.call(
batchprocess.CmdBatchCommands(),

View file

@ -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.
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
"""

View file

@ -3,4 +3,4 @@ Mirror object - Griatch 2015.
"""
from . import TutorialMirror # noqa
from .mirror import TutorialMirror # noqa

View file

@ -28,8 +28,8 @@ urlpatterns = [
path("", include("evennia.web.website.urls")),
# webclient
path("webclient/", include("evennia.web.webclient.urls")),
# admin
path("admin/", include("evennia.web.admin.urls")),
# admin -
# path("admin/", include("evennia.web.admin.urls")),
# favicon
path("favicon.ico", RedirectView.as_view(url="/media/images/favicon.ico", permanent=False)),
]