mirror of
https://github.com/evennia/evennia.git
synced 2026-03-24 16:56:32 +01:00
Merge branch 'league-improve-coverage'
This commit is contained in:
commit
fc6b8550b8
1 changed files with 21 additions and 0 deletions
|
|
@ -181,9 +181,24 @@ class TestGeneral(CommandTest):
|
|||
rid = self.room1.id
|
||||
self.call(general.CmdLook(), "here", "Room(#{})\nroom_desc".format(rid))
|
||||
|
||||
def test_look_no_location(self):
|
||||
self.char1.location = None
|
||||
self.call(general.CmdLook(), "", "You have no location to look at!")
|
||||
|
||||
def test_look_nonexisting(self):
|
||||
self.call(general.CmdLook(), "yellow sign", "Could not find 'yellow sign'.")
|
||||
|
||||
def test_home(self):
|
||||
self.call(general.CmdHome(), "", "You are already home")
|
||||
|
||||
def test_go_home(self):
|
||||
self.call(building.CmdTeleport(), "/quiet Room2")
|
||||
self.call(general.CmdHome(), "", "There's no place like home")
|
||||
|
||||
def test_no_home(self):
|
||||
self.char1.home = None
|
||||
self.call(general.CmdHome(), "", "You have no home")
|
||||
|
||||
def test_inventory(self):
|
||||
self.call(general.CmdInventory(), "", "You are not carrying anything.")
|
||||
|
||||
|
|
@ -213,6 +228,12 @@ class TestGeneral(CommandTest):
|
|||
self.assertEqual(None, self.char1.account.nicks.get("testalias", category="account"))
|
||||
self.assertEqual("testaliasedstring3", self.char1.nicks.get("testalias", category="object"))
|
||||
|
||||
def test_nick_list(self):
|
||||
self.call(general.CmdNick(), "/list", "No nicks defined.")
|
||||
self.call(general.CmdNick(), "test1 = Hello",
|
||||
"Inputline-nick 'test1' mapped to 'Hello'.")
|
||||
self.call(general.CmdNick(), "/list", "Defined Nicks:")
|
||||
|
||||
def test_get_and_drop(self):
|
||||
self.call(general.CmdGet(), "Obj", "You pick up Obj.")
|
||||
self.call(general.CmdDrop(), "Obj", "You drop Obj.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue