From 9ca4050b9ba07ec1dbacde1ce6f4eb569c83fb89 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 21 Oct 2003 04:50:03 +0000 Subject: [PATCH] Changed to use more generic names. --- plugins/Todo.py | 6 +++--- test/test_Todo.py | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/Todo.py b/plugins/Todo.py index f1c577e4b..be27ec5f5 100644 --- a/plugins/Todo.py +++ b/plugins/Todo.py @@ -137,7 +137,7 @@ class Todo(callbacks.Privmsg): for item in cursor.fetchall()] irc.reply(msg, utils.commaAndify(s)) - def addtodo(self, irc, msg, args): + def add(self, irc, msg, args): """[--priority=] Adds as a task in your own personal todo list. The optional @@ -165,7 +165,7 @@ class Todo(callbacks.Privmsg): self.db.commit() irc.reply(msg, conf.replySuccess) - def removetodo(self, irc, msg, args): + def remove(self, irc, msg, args): """ Removes from your personal todo list. @@ -188,7 +188,7 @@ class Todo(callbacks.Privmsg): irc.reply(msg, conf.replySuccess) _sqlTrans = string.maketrans('*?', '%_') - def searchtodo(self, irc, msg, args): + def search(self, irc, msg, args): """[--{regexp,exact}=] [] Searches the keyspace for tasks matching . If --regexp is given, diff --git a/test/test_Todo.py b/test/test_Todo.py index 3743ab43a..fb62231d0 100644 --- a/test/test_Todo.py +++ b/test/test_Todo.py @@ -50,31 +50,31 @@ if sqlite is not None: self.assertNotError('todo') self.assertRegexp('todo', 'You have no tasks in your todo list.') # Add a task - self.assertNotError('addtodo wash my car') + self.assertNotError('todo add wash my car') self.assertRegexp('todo', '#1: wash my car') # Check that task self.assertNotError('todo 1') def testAddtodo(self): - self.assertNotError('addtodo code a new plugin') - self.assertNotError('addtodo --priority=1000 fix all bugs') + self.assertNotError('todo add code a new plugin') + self.assertNotError('todo add --priority=1000 fix all bugs') def testRemovetodo(self): - self.assertNotError('addtodo do something else') - self.assertNotError('removetodo 1') + self.assertNotError('todo add do something else') + self.assertNotError('todo remove 1') def testSearchtodo(self): - self.assertNotError('addtodo task number one') - self.assertRegexp('searchtodo task*', '#1: task number one') - self.assertNotError('addtodo task number two is much longer than' + self.assertNotError('todo add task number one') + self.assertRegexp('todo search task*', '#1: task number one') + self.assertNotError('todo add task number two is much longer than' ' task number one') - self.assertRegexp('searchtodo task*', '#1: task number one and #2:' + self.assertRegexp('todo search task*','#1: task number one and #2:' ' task number two is much longer than task ' 'number...') - self.assertRegexp('searchtodo --exact "task number one"', + self.assertRegexp('todo search --exact "task number one"', '#1: task number one') - self.assertError('searchtodo --regexp s/bustedregex') - self.assertRegexp('searchtodo --regexp m/task/', '#1: task number' + self.assertError('todo search --regexp s/bustedregex') + self.assertRegexp('todo search --regexp m/task/', '#1: task number' ' one and #2: task number two is much longer ' 'than task number...')