Tests: use self.assertNotIn(). 87/18087/2
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Wed, 6 Mar 2019 23:11:28 +0000 (15:11 -0800)
committerOle Trøan <otroan@employees.org>
Mon, 11 Mar 2019 08:09:23 +0000 (08:09 +0000)
commit9a6dafd569db0d0b5dc9d7b5b34b17e3f411a9ee
tree3459a0c6df3fd09548daa9c315145dd2aaf03775
parentf70cead5eb928954908de48300cc7a9c88430c0f
Tests: use self.assertNotIn().

Many tests use self.assertEqual(error.find("failed"), -1)
Use self.assertNotIn("failed", error) to provide more meaningful errors such as
AssertionError: 'Failed' not found in '' instead of 0 != -1.

Change-Id: I670acdc977b788b2cedf94cfeafc12097781463f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
13 files changed:
test/test_bier.py
test/test_bihash.py
test/test_bond.py
test/test_fib.py
test/test_ip_mcast.py
test/test_nat.py
test/test_p2p_ethernet.py
test/test_sctp.py
test/test_session.py
test/test_string.py
test/test_tcp.py
test/test_udp.py
test/test_vhost.py