def test_help(self): command = ListContextCommand(["help"], None, self.out, self.error) command.execute() self.assertEqual(self.output, "") self.assertEqual(self.errors, command.usage() + "\n\n" + command.help() + "\n")
def test_contexts2(self): todolist = load_file_to_todolist("test/data/TodoListTest.txt") command = ListContextCommand(["aaa"], todolist, self.out, self.error) command.execute() self.assertEqual(self.output, "Context1\nContext2\n") self.assertFalse(self.errors)
def test_contexts2(self): todolist = load_file_to_todolist("test/data/TodoListTest.txt") command = ListContextCommand(["aaa"], todolist, self.out, self.error) command.execute() self.assertEqual(self.output, "Context1\nContext2\n") self.assertFalse(self.errors)
def test_help(self): command = ListContextCommand(["help"], None, self.out, self.error) command.execute() self.assertEqual(self.output, "") self.assertEqual(self.errors, command.usage() + "\n\n" + command.help() + "\n")
def test_listcontext_name(self): name = ListContextCommand.name() self.assertEqual(name, 'listcontext')
def test_listcontext_name(self): name = ListContextCommand.name() self.assertEqual(name, 'listcontext')