Update tests.py
This commit is contained in:
parent
298784cbab
commit
7d4e83d3c8
1 changed files with 13 additions and 0 deletions
|
|
@ -72,6 +72,19 @@ class TestExtendedRoom(BaseEvenniaCommandTest):
|
||||||
extended_room.CmdExtendedRoomLook(), "nonexistent", "Could not find 'nonexistent'."
|
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):
|
def test_cmdsetdetail(self):
|
||||||
self.call(extended_room.CmdExtendedRoomDetail(), "", "Details on Room")
|
self.call(extended_room.CmdExtendedRoomDetail(), "", "Details on Room")
|
||||||
self.call(
|
self.call(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue