Tests for @desc obj=
This commit is contained in:
parent
5387419a3d
commit
6b96e84fd0
1 changed files with 15 additions and 1 deletions
|
|
@ -263,6 +263,20 @@ class TestBuilding(CommandTest):
|
||||||
def test_desc(self):
|
def test_desc(self):
|
||||||
self.call(building.CmdDesc(), "Obj2=TestDesc", "The description was set on Obj2(#5).")
|
self.call(building.CmdDesc(), "Obj2=TestDesc", "The description was set on Obj2(#5).")
|
||||||
|
|
||||||
|
def test_empty_desc(self):
|
||||||
|
o2d = self.obj2.db.desc
|
||||||
|
r1d = self.room1.db.desc
|
||||||
|
self.call(building.CmdDesc(), "Obj2=", "The description was set on Obj2(#5).")
|
||||||
|
assert self.obj2.db.desc == ''
|
||||||
|
assert self.room1.db.desc == r1d
|
||||||
|
|
||||||
|
def test_desc_default_to_room(self):
|
||||||
|
o2d = self.obj2.db.desc
|
||||||
|
r1d = self.room1.db.desc
|
||||||
|
self.call(building.CmdDesc(), "Obj2", "The description was set on Room(#1).")
|
||||||
|
assert self.obj2.db.desc == o2d
|
||||||
|
assert self.room1.db.desc == 'Obj2'
|
||||||
|
|
||||||
def test_wipe(self):
|
def test_wipe(self):
|
||||||
confirm = building.CmdDestroy.confirm
|
confirm = building.CmdDestroy.confirm
|
||||||
building.CmdDestroy.confirm = False
|
building.CmdDestroy.confirm = False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue