Commit df9556d1 authored by Alex Willmer's avatar Alex Willmer Committed by David Wilson

Replace custom assertContains() with unitest2 assertIn()

parent 17da6e99
...@@ -36,7 +36,7 @@ class CommandLineTest(testlib.RouterMixin, testlib.TestCase): ...@@ -36,7 +36,7 @@ class CommandLineTest(testlib.RouterMixin, testlib.TestCase):
stdout, stderr = proc.communicate() stdout, stderr = proc.communicate()
self.assertEquals(0, proc.returncode) self.assertEquals(0, proc.returncode)
self.assertEquals("EC0\n", stdout) self.assertEquals("EC0\n", stdout)
self.assertContains("EOFError", stderr) self.assertIn("EOFError", stderr)
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -126,9 +126,6 @@ class TestCase(unittest.TestCase): ...@@ -126,9 +126,6 @@ class TestCase(unittest.TestCase):
assert 0, '%r raised %r, not %r' % (func, e, exc) assert 0, '%r raised %r, not %r' % (func, e, exc)
assert 0, '%r did not raise %r' % (func, exc) assert 0, '%r did not raise %r' % (func, exc)
def assertContains(self, needle, hay):
assert needle in hay, "%r not found in %r" % (needle, hay)
class DockerizedSshDaemon(object): class DockerizedSshDaemon(object):
def __init__(self): def __init__(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment