PYTHON-703 Fix tests for Python 2.4.

This commit is contained in:
A. Jesse Jiryu Davis 2014-10-24 13:09:46 -04:00
parent 0cdb43fcc5
commit a657a263b5

View File

@ -169,7 +169,7 @@ class TestSON(unittest.TestCase):
has_key and __contains__
"""
test_son = SON([(1, 100), (2, 200), (3, 300)])
self.assertIn(1, test_son)
self.assertTrue(1 in test_son)
self.assertTrue(2 in test_son, "in failed")
self.assertFalse(22 in test_son, "in succeeded when it shouldn't")
self.assertTrue(test_son.has_key(2), "has_key failed")
@ -181,7 +181,7 @@ class TestSON(unittest.TestCase):
"""
test_son = SON([(1, 100), (2, 200), (3, 300)])
test_son.clear()
self.assertNotIn(1, test_son)
self.assertFalse(1 in test_son)
self.assertEqual(0, len(test_son))
self.assertEqual(0, len(test_son.keys()))
self.assertEqual({}, test_son.to_dict())