Update tests.py

This commit is contained in:
Antrare 2023-01-30 11:53:26 +11:00 committed by GitHub
parent 298784cbab
commit 7d4e83d3c8

View file

@ -71,6 +71,19 @@ class TestExtendedRoom(BaseEvenniaCommandTest):
self.call(
extended_room.CmdExtendedRoomLook(), "nonexistent", "Could not find 'nonexistent'."
)
def test_cmdextendedlook_second_person(self):
# char2 is already in the same room.
# replace char2.msg with a Mock; this disables it and will catch what it is called with
self.char2.msg = Mock()
self.call(
extended_room.CmdExtendedRoomLook(),
"testdetail"
)
# check what char2 saw.
self.char2.msg.assert_called_with(text=('Char looks closely at testdetail.\n', {}), from_obj=self.char1)
def test_cmdsetdetail(self):
self.call(extended_room.CmdExtendedRoomDetail(), "", "Details on Room")