コード例 #1
0
    def test_help(self):
        command = DeleteCommand(["help"], self.todolist, self.out, self.error)
        command.execute()

        self.assertEqual(self.output, "")
        self.assertEqual(self.errors,
                         command.usage() + "\n\n" + command.help() + "\n")
コード例 #2
0
    def test_empty(self):
        command = DeleteCommand([], self.todolist, self.out, self.error)
        command.execute()

        self.assertFalse(self.todolist.is_dirty())
        self.assertFalse(self.output)
        self.assertEqual(self.errors, command.usage() + "\n")
コード例 #3
0
    def test_help(self):
        command = DeleteCommand(["help"], self.todolist, self.out, self.error)
        command.execute()

        self.assertEqual(self.output, "")
        self.assertEqual(self.errors,
                         command.usage() + "\n\n" + command.help() + "\n")
コード例 #4
0
    def test_empty(self):
        command = DeleteCommand([], self.todolist, self.out, self.error)
        command.execute()

        self.assertFalse(self.todolist.is_dirty())
        self.assertFalse(self.output)
        self.assertEqual(self.errors, command.usage() + "\n")
コード例 #5
0
    def test_empty(self):
        command = DeleteCommand([], self.todolist, self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertFalse(self.todolist.dirty)
        self.assertFalse(self.output)
        self.assertEqual(self.errors, command.usage() + "\n")
コード例 #6
0
ファイル: test_delete_command.py プロジェクト: bram85/topydo
    def test_empty(self):
        command = DeleteCommand([], self.todolist, self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertFalse(self.todolist.dirty)
        self.assertFalse(self.output)
        self.assertEqual(self.errors, command.usage() + "\n")