unittest.TestCase.assertNotIn

TestCase.assertNotIn(member, container, msg=None)[source]

Just like self.assertTrue(a not in b), but with a nicer default message.