Add tests to cover all 3 cases of CmdHome

This commit is contained in:
Christopher League 2022-03-02 13:20:58 -05:00 committed by Griatch
parent 05d77a4a18
commit c0fe6af2e7

View file

@ -68,6 +68,14 @@ class TestGeneral(BaseEvenniaCommandTest):
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.")