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
|
||||||
|
|
@ -446,4 +460,4 @@ class TestUnconnectedCommand(CommandTest):
|
||||||
settings.SERVERNAME,
|
settings.SERVERNAME,
|
||||||
datetime.datetime.fromtimestamp(gametime.SERVER_START_TIME).ctime(),
|
datetime.datetime.fromtimestamp(gametime.SERVER_START_TIME).ctime(),
|
||||||
SESSIONS.account_count(), utils.get_evennia_version())
|
SESSIONS.account_count(), utils.get_evennia_version())
|
||||||
self.call(unloggedin.CmdUnconnectedInfo(), "", expected)
|
self.call(unloggedin.CmdUnconnectedInfo(), "", expected)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue