mirror of
https://github.com/evennia/evennia.git
synced 2026-03-26 09:46:32 +01:00
Fixed comm-related unittest failures
This commit is contained in:
parent
1a65d12b2c
commit
96f26098d1
3 changed files with 3 additions and 6 deletions
|
|
@ -415,7 +415,6 @@ class CmdCemit(MuxPlayerCommand):
|
|||
@cemit[/switches] <channel> = <message>
|
||||
|
||||
Switches:
|
||||
noheader - don't show the [channel] header before the message
|
||||
sendername - attach the sender's name before the message
|
||||
quiet - don't echo the message back to sender
|
||||
|
||||
|
|
@ -447,8 +446,6 @@ class CmdCemit(MuxPlayerCommand):
|
|||
message = self.rhs
|
||||
if "sendername" in self.switches:
|
||||
message = "%s: %s" % (self.key, message)
|
||||
if not "noheader" in self.switches:
|
||||
message = "[%s] %s" % (channel.key, message)
|
||||
channel.msg(message)
|
||||
if not "quiet" in self.switches:
|
||||
string = "Sent to channel %s: %s" % (channel.key, message)
|
||||
|
|
|
|||
|
|
@ -268,11 +268,11 @@ class TestComms(CommandTest):
|
|||
self.call(comms.CmdAllCom(), "", "Available channels (use comlist,addcom and delcom to manage")
|
||||
self.call(comms.CmdClock(), "testchan=send:all()", "Lock(s) applied. Current locks on testchan:")
|
||||
self.call(comms.CmdCdesc(), "testchan = Test Channel", "Description of channel 'testchan' set to 'Test Channel'.")
|
||||
self.call(comms.CmdCemit(), "testchan = Test Message", "Sent to channel testchan: [testchan] Test Message")
|
||||
self.call(comms.CmdCemit(), "testchan = Test Message", "[testchan] Test Message|Sent to channel testchan: Test Message")
|
||||
self.call(comms.CmdCWho(), "testchan", "Channel subscriptions\ntestchan:\n TestPlayer7")
|
||||
self.call(comms.CmdPage(), "TestPlayer7b = Test", "You paged TestPlayer7b with: 'Test'.")
|
||||
self.call(comms.CmdCBoot(), "", "Usage: @cboot[/quiet] <channel> = <player> [:reason]") # noone else connected to boot
|
||||
self.call(comms.CmdCdestroy(), "testchan" ,"Channel 'testchan' was destroyed.")
|
||||
self.call(comms.CmdCdestroy(), "testchan" ,"[testchan] TestPlayer7: testchan is being destroyed. Make sure to change your aliases.|Channel 'testchan' was destroyed.")
|
||||
|
||||
|
||||
from src.commands.default import batchprocess
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ class ObjectManager(TypedObjectManager):
|
|||
return [obj for ind, obj in enumerate(key_candidates) if ind in index_matches]
|
||||
else:
|
||||
alias_candidates = self.filter(id__in=candidates_id, db_tags__db_category__iexact="objectalias")
|
||||
print alias_candidates
|
||||
#print alias_candidates
|
||||
alias_strings = alias_candidates.values_list("db_key", flat=True)
|
||||
index_matches = string_partial_matching(alias_strings, ostring, ret_index=True)
|
||||
if index_matches:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue