Change save/search_prototype, extend unittests

This commit is contained in:
Griatch 2019-02-09 16:52:02 +01:00
parent dac10eef2b
commit 0dfea46d5c
12 changed files with 154 additions and 39 deletions

View file

@ -2978,7 +2978,7 @@ class CmdSpawn(COMMAND_DEFAULT_CLASS):
# all seems ok. Try to save.
try:
prot = protlib.save_prototype(**prototype)
prot = protlib.save_prototype(prototype)
if not prot:
caller.msg("|rError saving:|R {}.|n".format(prototype_key))
return

View file

@ -680,9 +680,9 @@ class TestBuilding(CommandTest):
goblin.delete()
# create prototype
protlib.create_prototype(**{'key': 'Ball',
'typeclass': 'evennia.objects.objects.DefaultCharacter',
'prototype_key': 'testball'})
protlib.create_prototype({'key': 'Ball',
'typeclass': 'evennia.objects.objects.DefaultCharacter',
'prototype_key': 'testball'})
# Tests "@spawn <prototype_name>"
self.call(building.CmdSpawn(), "testball", "Spawned Ball")