From 12bd696c799915fce6e48ad40d3ba8175e0ff872 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Mon, 23 Mar 2015 00:00:02 +0100 Subject: [PATCH] tests: Test execute command with return_all flag --- tasklib/tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasklib/tests.py b/tasklib/tests.py index 19950a6..29b88a0 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -676,6 +676,16 @@ class TaskTest(TasklibTest): self.tw.execute_command(['+test', 'mod', 'unified', 'description']) + def test_return_all_from_executed_command(self): + Task(self.tw, description="test task", tags=['test']).save() + out, err, rc = self.tw.execute_command(['count'], return_all=True) + self.assertEqual(rc, 0) + + def test_return_all_from_failed_executed_command(self): + Task(self.tw, description="test task", tags=['test']).save() + out, err, rc = self.tw.execute_command(['countinvalid'], return_all=True) + self.assertNotEqual(rc, 0) + class TaskFromHookTest(TasklibTest): -- 2.39.2