mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Improve coverage of commands "look" and "nick"
This commit is contained in:
parent
2bbda066dd
commit
05d77a4a18
1 changed files with 13 additions and 0 deletions
|
|
@ -58,6 +58,13 @@ class TestGeneral(BaseEvenniaCommandTest):
|
|||
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")
|
||||
|
||||
|
|
@ -90,6 +97,12 @@ class TestGeneral(BaseEvenniaCommandTest):
|
|||
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