changeset 2645:3f499601e702

Whitespace fixes.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Mon, 06 Aug 2007 03:57:36 +0200
parents 40cf22f3f40b
children 9e899085df6e
files jabberbot/_tests/test_xmppbot.py jabberbot/xmlrpcbot.py
diffstat 2 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/jabberbot/_tests/test_xmppbot.py	Mon Aug 06 03:56:59 2007 +0200
+++ b/jabberbot/_tests/test_xmppbot.py	Mon Aug 06 03:57:36 2007 +0200
@@ -14,35 +14,35 @@
 
 class TestXMPPBotCommands:
     """Various tests for the XMPP bot receiving commands from Wiki"""
-    
+
     def setup_class(self):
         self.from_xmlrpc = Queue()
         self.to_xmlrpc = Queue()
         self.bot = XMPPBot(BotConfig, self.from_xmlrpc, self.to_xmlrpc)
-    
+
     def setup_method(self, method):
         self.called = False
         self.bot.send_message = self.dummy_method
         self.bot.ask_for_subscription = self.dummy_method
         self.bot.remove_subscription = self.dummy_method
-        
+
     def dummy_method(self, *args, **kwargs):
         self.called = True
-        
+
     def testNotificationCommand(self):
         """Check if send_message is triggered for tested commands"""
-        
+
         data = {'text': 'Some notification', 'subject': 'It is optional', 'url_list': []}
         cmds = []
         cmds.append(commands.NotificationCommand(["dude@example.com"], data, True))
         cmds.append(commands.NotificationCommandI18n(["dude@example.com"], data, True))
         cmds.append(commands.GetPage("dude@example.com", "TestPage"))
         cmds.append(commands.GetPageHTML("dude@example.com", "TestPage"))
-        
+
         tmp_cmd = commands.GetPageList("dude@example.com")
         tmp_cmd.data = ""
         cmds.append(tmp_cmd)
-        
+
         tmp_cmd = commands.GetPageInfo("dude@example.com", "TestPage")
         tmp_cmd.data = {'author': 'dude', 'lastModified': '200708060T34350', 'version': 42}
         cmds.append(tmp_cmd)
@@ -51,31 +51,31 @@
             self.called = False
             self.bot.handle_command(cmd)
             if not self.called:
-                print "The bot should send a notification when %s arrives!" % (cmd.__class__.__name__,)
+                print "The bot should send a notification when %s arrives!" % (cmd.__class__.__name__, )
                 raise Exception()
- 
+
     def testRosterCommands(self):
         """Test if appropriate functions are called for (Add|Remove)JIDFromRosterCommand"""
-        
+
         command = commands.AddJIDToRosterCommand("dude@example.com")
         self.bot.handle_command(command)
-        
+
         if not self.called:
             print "The bot should do something when AddJIDToRosterCommand arrives!"
             raise Exception()
-        
+
         self.called = False
         command = commands.RemoveJIDFromRosterCommand("dude@example.com")
         self.bot.handle_command(command)
-        
+
         if not self.called:
             print "The bot should do something when RemoveJIDFromRosterCommand arrives!"
             raise Exception()
-        
+
     def testInternalHelp(self):
         """Check if there's help for every known command"""
-        
+
         commands = self.bot.internal_commands + self.bot.xmlrpc_commands.values()
         for cmd in commands:
-            print "There should be help on %s command!" % (cmd,)
+            print "There should be help on %s command!" % (cmd, )
             assert self.bot.help_on("dude@example.com", cmd)
--- a/jabberbot/xmlrpcbot.py	Mon Aug 06 03:56:59 2007 +0200
+++ b/jabberbot/xmlrpcbot.py	Mon Aug 06 03:57:36 2007 +0200
@@ -271,14 +271,14 @@
             error = "You must set a (long) secret string"
             self.log.critical(error)
             raise ConfigurationError(error)
-        
+
         self.server = None
 
     def run(self):
         """Starts the server / thread"""
 
         self.server = SimpleXMLRPCServer((config.xmlrpc_host, config.xmlrpc_port))
-        
+
         # Register methods having an "export" attribute as XML RPC functions and
         # decorate them with a check for a shared (wiki-bot) secret.
         items = self.__class__.__dict__.items()