Commit 2d4fff19 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Fix test case and correct for the new results.

parent aae4efa7
import re
import Command
from Command import *
from PrettyPrinter import *
from Recurrence import advance_recurring_todo
from TodoList import InvalidTodoException
from Utils import convert_todo_number, InvalidTodoNumberException
class DoCommand(Command.Command):
class DoCommand(Command):
def __init__(self, p_args, p_todolist,
p_out=lambda a: None,
p_err=lambda a: None,
......@@ -18,7 +18,7 @@ class DoCommand(Command.Command):
try:
self.number = convert_todo_number(self.argument(0))
self.todo = self.todolist.todo(self.number)
except (InvalidTodoNumberException, InvalidTodoException):
except (InvalidCommandArgument, InvalidTodoNumberException, InvalidTodoException):
self.todo = None
def _complete_children(self):
......
......@@ -102,7 +102,7 @@ class DoCommandTest(CommandTest.CommandTest):
self.assertEquals(self.errors, "Todo has already been completed.\n")
def test_empty(self):
command = DoCommand.DoCommand([""], self.todolist, self.out, self.error)
command = DoCommand.DoCommand([], self.todolist, self.out, self.error)
command.execute()
self.assertFalse(self.todolist.is_dirty())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment