mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Update tests.py
This commit is contained in:
parent
298784cbab
commit
7d4e83d3c8
1 changed files with 13 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue