PYTHON-703 Fix tests for Python 2.4.
This commit is contained in:
parent
0cdb43fcc5
commit
a657a263b5
@ -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())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user