Commit 62afca6b authored by Jacek Sowiński's avatar Jacek Sowiński

Add test for 'pri' with multiple todos.

parent cd587fd6
...@@ -62,6 +62,14 @@ class PriorityCommandTest(CommandTest.CommandTest): ...@@ -62,6 +62,14 @@ class PriorityCommandTest(CommandTest.CommandTest):
self.assertEquals(self.output, "(A) Foo\n") self.assertEquals(self.output, "(A) Foo\n")
self.assertEquals(self.errors, "") self.assertEquals(self.errors, "")
def test_set_prio5(self):
command = PriorityCommand(["Foo", "2", "C"], self.todolist, self.out, self.error)
command.execute()
self.assertTrue(self.todolist.is_dirty())
self.assertEquals(self.output, "Priority changed from A to C\n(C) Foo\nPriority set to C.\n(C) Bar\n")
self.assertEquals(self.errors, "")
def test_invalid1(self): def test_invalid1(self):
command = PriorityCommand(["99", "A"], self.todolist, self.out, self.error) command = PriorityCommand(["99", "A"], self.todolist, self.out, self.error)
command.execute() command.execute()
......
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