From 96f26098d1bc388be73614d8c3dca065cbfeb549 Mon Sep 17 00:00:00 2001 From: Griatch Date: Mon, 3 Mar 2014 12:45:28 +0100 Subject: [PATCH] Fixed comm-related unittest failures --- src/commands/default/comms.py | 3 --- src/commands/default/tests.py | 4 ++-- src/objects/manager.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/commands/default/comms.py b/src/commands/default/comms.py index 3b66f4ce47..69a9ddb06a 100644 --- a/src/commands/default/comms.py +++ b/src/commands/default/comms.py @@ -415,7 +415,6 @@ class CmdCemit(MuxPlayerCommand): @cemit[/switches] = 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) diff --git a/src/commands/default/tests.py b/src/commands/default/tests.py index f598af37ce..f970bb39b4 100644 --- a/src/commands/default/tests.py +++ b/src/commands/default/tests.py @@ -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] = [: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 diff --git a/src/objects/manager.py b/src/objects/manager.py index d3d8f362c0..60e51bd9cc 100644 --- a/src/objects/manager.py +++ b/src/objects/manager.py @@ -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: