Commit 3c665f42 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add two simple tests.

parent a390086f
import CommandTest
import TestFacilities
import ListContextCommand
class ListContextCommandTest(CommandTest.CommandTest):
def test_contexts1(self):
todolist = TestFacilities.load_file_to_todolist("data/TodoListTest.txt")
command = ListContextCommand.ListContextCommand([""], todolist, self.out, self.error)
command.execute()
self.assertEquals(self.output,"Context1\nContext2\n")
self.assertFalse(self.errors)
def test_contexts2(self):
todolist = TestFacilities.load_file_to_todolist("data/TodoListTest.txt")
command = ListContextCommand.ListContextCommand(["aaa"], todolist, self.out, self.error)
command.execute()
self.assertEquals(self.output,"Context1\nContext2\n")
self.assertFalse(self.errors)
import CommandTest
import TestFacilities
import ListProjectCommand
class ListProjectCommandTest(CommandTest.CommandTest):
def test_projects1(self):
todolist = TestFacilities.load_file_to_todolist("data/TodoListTest.txt")
command = ListProjectCommand.ListProjectCommand([""], todolist, self.out, self.error)
command.execute()
self.assertEquals(self.output,"Project1\nProject2\n")
self.assertFalse(self.errors)
def test_projects2(self):
todolist = TestFacilities.load_file_to_todolist("data/TodoListTest.txt")
command = ListProjectCommand.ListProjectCommand(["aaa"], todolist, self.out, self.error)
command.execute()
self.assertEquals(self.output,"Project1\nProject2\n")
self.assertFalse(self.errors)
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