Make examine command more modular; show attr-categories and value types.

See #1805.
This commit is contained in:
Griatch 2021-11-21 03:37:32 +01:00
parent fa3c2aacb7
commit 09f51a644a
4 changed files with 377 additions and 339 deletions

View file

@ -918,7 +918,7 @@ class TestBuilding(CommandTest):
self.call(building.CmdExamine(), "*TestAccount", "Name/key: TestAccount")
self.char1.db.test = "testval"
self.call(building.CmdExamine(), "self/test", "Persistent attribute(s):\n test = testval")
self.call(building.CmdExamine(), "self/test", "Attribute Char/test [category=None]:\n\ntestval")
self.call(building.CmdExamine(), "NotFound", "Could not find 'NotFound'.")
self.call(building.CmdExamine(), "out", "Name/key: out")
@ -927,7 +927,7 @@ class TestBuilding(CommandTest):
self.call(
building.CmdExamine(),
"self/test2",
"Persistent attribute(s):\n test2 = this is a \$random() value.",
"Attribute Char/test2 [category=None]:\n\nthis is a \$random() value."
)
self.room1.scripts.add(self.script.__class__)
@ -1864,6 +1864,7 @@ class TestBuilding(CommandTest):
)
from evennia.utils.create import create_channel # noqa
class TestCommsChannel(CommandTest):
@ -2085,6 +2086,21 @@ class TestCommsChannel(CommandTest):
)
from evennia.comms import comms # noqa
class TestComms(CommandTest):
def test_page(self):
self.call(
comms.CmdPage(),
"TestAccount2 = Test",
"TestAccount2 is offline. They will see your message if they list their pages later."
"|You paged TestAccount2 with: 'Test'.",
receiver=self.account,
)
class TestBatchProcess(CommandTest):
@patch("evennia.contrib.tutorial_examples.red_button.repeat")