From ca81d35e1c5f5ff84c2b7a6c9d82651e8ca7f96c Mon Sep 17 00:00:00 2001 From: Henddher Pedroza Date: Fri, 19 Oct 2018 18:44:45 -0500 Subject: [PATCH] Baseline tests: assert current behavior (disregarding requirements) --- evennia/commands/default/tests.py | 36 +++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/evennia/commands/default/tests.py b/evennia/commands/default/tests.py index 691e1e63cb..be47a06aac 100644 --- a/evennia/commands/default/tests.py +++ b/evennia/commands/default/tests.py @@ -460,16 +460,44 @@ class TestBuilding(CommandTest): # Test listing commands self.call(building.CmdSpawn(), "/list", "Key ") - # @span/edit + # @span/edit (missing prototype) self.call( building.CmdSpawn(), '/edit', - 'spawn: Extra switch "/edit" ignored') + '@spawn: Extra switch "/edit" ignored.|Usage: @spawn or {key: value, ...}\n (2 existing prototypes. Use /list to inspect)') + # assert 'Prototype wizard' in msg - # @span/examine + # @spawn/edit with valid prototype + # with self.assertRaises(AttributeError): self.call( + building.CmdSpawn(), + '/edit BALL', + '@spawn: Extra switch "/edit" ignored.|Spawned Ball(#13).') + + # @spawn/edit with invalid prototype + #`with self.assertRaises(AttributeError): + self.call( + building.CmdSpawn(), + '/edit NO_EXISTS', + '@spawn: Extra switch "/edit" ignored.|No prototype named \'NO_EXISTS\'.') + + # @spawn/examine (missing prototype) + self.call( + building.CmdSpawn(), '/examine', - building.CmdSpawn(), 'spawn: Extra switch "/examine" ignored') + '@spawn: Extra switch "/examine" ignored.|Usage: @spawn or {key: value, ...}\n (2 existing prototypes. Use /list to inspect)') + + # @spawn/examine with valid prototype + self.call( + building.CmdSpawn(), + '/examine BALL', + '@spawn: Extra switch "/examine" ignored.|Spawned Ball(#14).') + + # @spawn/examine with invalid prototype + self.call( + building.CmdSpawn(), + '/examine NO_EXISTS', + '@spawn: Extra switch "/examine" ignored.|No prototype named \'NO_EXISTS\'.') class TestComms(CommandTest):