mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02:00
Added turnbattle command tests
Added unit tests for the combat commands in the new 'turnbattle.py' contrib module.
This commit is contained in:
parent
334eaf6929
commit
822a17ba63
1 changed files with 11 additions and 0 deletions
|
|
@ -755,4 +755,15 @@ class TestTutorialWorldRooms(CommandTest):
|
|||
def test_outroroom(self):
|
||||
create_object(tutrooms.OutroRoom, key="outroroom")
|
||||
|
||||
# test turnbattle
|
||||
from evennia.contrib import turnbattle
|
||||
|
||||
class TestTurnBattle(CommandTest):
|
||||
|
||||
# Test combat commands
|
||||
def test_turnbattlecmd(self):
|
||||
self.call(turnbattle.CmdFight(), "", "You can't start a fight if you've been defeated!")
|
||||
self.call(turnbattle.CmdAttack(), "", "You can only do that in combat. (see: help fight)")
|
||||
self.call(turnbattle.CmdPass(), "", "You can only do that in combat. (see: help fight)")
|
||||
self.call(turnbattle.CmdDisengage(), "", "You can only do that in combat. (see: help fight)")
|
||||
self.call(turnbattle.CmdRest(), "", "Char rests to recover HP.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue