Unittest - Adjust failing tests due to split of streams

This commit is contained in:
Renato Alves 2014-10-20 18:51:18 +01:00
parent efdb31fb90
commit d09fcf398e
3 changed files with 7 additions and 7 deletions

View file

@ -59,7 +59,7 @@ class TestBug360RemovalError(BaseTestBug360):
expected = "Modified 2 tasks."
self.assertIn(expected, out)
expected = "You cannot remove the recurrence from a recurring task."
self.assertNotIn(expected, out)
self.assertNotIn(expected, err)
def test_cannot_remove_recurrence(self):
"""Cannot remove recurrence from recurring task
@ -73,7 +73,7 @@ class TestBug360RemovalError(BaseTestBug360):
self.assertEqual(code, 2)
expected = "You cannot remove the recurrence from a recurring task."
self.assertIn(expected, out)
self.assertIn(expected, err)
def test_cannot_remove_due_date(self):
"""Cannot remove due date from recurring task
@ -87,7 +87,7 @@ class TestBug360RemovalError(BaseTestBug360):
self.assertEqual(code, 2)
expected = "You cannot remove the due date from a recurring task."
self.assertIn(expected, out)
self.assertIn(expected, err)
class TestBug360AllowedChanges(BaseTestBug360):
@ -117,7 +117,7 @@ class TestBug360AllowedChanges(BaseTestBug360):
expected = "Modified 1 task."
self.assertIn(expected, out)
expected = "You cannot remove the due date from a recurring task."
self.assertNotIn(expected, out)
self.assertNotIn(expected, err)
# Make sure no duplicate tasks were created
args = ("diag",)

View file

@ -23,7 +23,7 @@ class TestCMD(TestCase):
def test_default_command(self):
"""default command"""
code, out, err = self.t(())
self.assertIn("task list]", out)
self.assertIn("task list]", err)
def test_info_command(self):
"""info command"""

View file

@ -19,7 +19,7 @@ class TestEmptyFilter(TestCase):
self.t(("add", "bar"))
code, out, err = self.t.runError(("modify", "rc.allow.empty.filter=yes", "rc.confirmation=no", "priority:H"))
self.assertIn("Command prevented from running.", out)
self.assertIn("Command prevented from running.", err)
def test_empty_filter_error(self):
"""Modify tasks with no filter, and disallowed confirmation."""
@ -28,7 +28,7 @@ class TestEmptyFilter(TestCase):
self.t(("add", "bar"))
code, out, err = self.t.runError(("modify", "rc.allow.empty.filter=no", "priority:H"))
self.assertIn("You did not specify a filter, and with the 'allow.empty.filter' value, no action is taken.", out)
self.assertIn("You did not specify a filter, and with the 'allow.empty.filter' value, no action is taken.", err)
if __name__ == "__main__":
from simpletap import TAPTestRunner