Source code for evennia.contrib.base_systems.mux_comms_cmds.tests

Legacy Mux comms tests (extracted from 0.9.5)


from evennia.commands.default.tests import BaseEvenniaCommandTest

from . import mux_comms_cmds as comms

[docs]class TestLegacyMuxComms(BaseEvenniaCommandTest): """ Test the legacy comms contrib. """
[docs] def setUp(self): super().setUp() comms.CmdChannelCreate(), "testchan;test=Test Channel", "Created channel testchan and connected to it.", receiver=self.account, )
[docs] def test_toggle_com(self): comms.CmdAddCom(), "tc = testchan", "You are already connected to channel testchan.| You can now", receiver=self.account, ) comms.CmdDelCom(), "tc", "Any alias 'tc' for channel testchan was cleared.", receiver=self.account, )
[docs] def test_all_com(self): comms.CmdAllCom(), "", "Available channels:", receiver=self.account, )
[docs] def test_clock(self): comms.CmdClock(), "testchan=send:all()", "Lock(s) applied. Current locks on testchan:", receiver=self.account, )
[docs] def test_cdesc(self): comms.CmdCdesc(), "testchan = Test Channel", "Description of channel 'testchan' set to 'Test Channel'.", receiver=self.account, )
[docs] def test_cwho(self): comms.CmdCWho(), "testchan", "Channel subscriptions\ntestchan:\n TestAccount", receiver=self.account, )
[docs] def test_cboot(self): # No one else connected to boot comms.CmdCBoot(), "", "Usage: cboot[/quiet] <channel> = <account> [:reason]", receiver=self.account, )
[docs] def test_cdestroy(self): comms.CmdCdestroy(), "testchan", "[testchan] TestAccount: testchan is being destroyed. Make sure to change your aliases." "|Channel 'testchan' was destroyed.", receiver=self.account, )