Unittest - Remove redundant checks
self.t == self.runSuccess -> fails if exit code is != 0
This commit is contained in:
@@ -19,33 +19,27 @@ class Test1418(TestCase):
|
|||||||
"""Check that you can search with a slash (/)"""
|
"""Check that you can search with a slash (/)"""
|
||||||
command = ("add", "foo/bar")
|
command = ("add", "foo/bar")
|
||||||
code, out, err = self.t(command)
|
code, out, err = self.t(command)
|
||||||
self.assertEquals(code, 0)
|
|
||||||
|
|
||||||
command = ("foo/bar",)
|
command = ("foo/bar",)
|
||||||
code, out, err = self.t(command)
|
code, out, err = self.t(command)
|
||||||
self.assertEquals(code, 0)
|
|
||||||
self.assertIn("foo/bar", out)
|
self.assertIn("foo/bar", out)
|
||||||
|
|
||||||
def test_minus_in_description(self):
|
def test_minus_in_description(self):
|
||||||
"""Check that you can search with a minus (-)"""
|
"""Check that you can search with a minus (-)"""
|
||||||
command = ("add", "foo-")
|
command = ("add", "foo-")
|
||||||
code, out, err = self.t(command)
|
code, out, err = self.t(command)
|
||||||
self.assertEquals(code, 0)
|
|
||||||
|
|
||||||
command = ("foo-",)
|
command = ("foo-",)
|
||||||
code, out, err = self.t(command)
|
code, out, err = self.t(command)
|
||||||
self.assertEquals(code, 0)
|
|
||||||
self.assertIn("foo-", out)
|
self.assertIn("foo-", out)
|
||||||
|
|
||||||
def test_plus_in_description(self):
|
def test_plus_in_description(self):
|
||||||
"""Check that you can search with a plus (+)"""
|
"""Check that you can search with a plus (+)"""
|
||||||
command = ("add", "foo+")
|
command = ("add", "foo+")
|
||||||
code, out, err = self.t(command)
|
code, out, err = self.t(command)
|
||||||
self.assertEquals(code, 0)
|
|
||||||
|
|
||||||
command = ("foo+",)
|
command = ("foo+",)
|
||||||
code, out, err = self.t(command)
|
code, out, err = self.t(command)
|
||||||
self.assertEquals(code, 0)
|
|
||||||
self.assertIn("foo+", out)
|
self.assertIn("foo+", out)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user