use assert[Not]In where appropriate

This commit is contained in:
Ezio Melotti 2010-01-23 15:40:09 +00:00
parent 0f77f465ff
commit b58e0bd8bb
39 changed files with 176 additions and 173 deletions

View file

@ -30,7 +30,7 @@ class XmlTestBase(unittest.TestCase):
self.assertEquals(attrs.getNames(), [])
self.assertEquals(attrs.getQNames(), [])
self.assertEquals(len(attrs), 0)
self.assertFalse("attr" in attrs)
self.assertNotIn("attr", attrs)
self.assertEquals(list(attrs.keys()), [])
self.assertEquals(attrs.get("attrs"), None)
self.assertEquals(attrs.get("attrs", 25), 25)
@ -47,7 +47,7 @@ class XmlTestBase(unittest.TestCase):
self.assertEquals(attrs.getNames(), [])
self.assertEquals(attrs.getQNames(), [])
self.assertEquals(len(attrs), 0)
self.assertFalse((ns_uri, "attr") in attrs)
self.assertNotIn((ns_uri, "attr"), attrs)
self.assertEquals(list(attrs.keys()), [])
self.assertEquals(attrs.get((ns_uri, "attr")), None)
self.assertEquals(attrs.get((ns_uri, "attr"), 25), 25)