Fixes bug 927643.

Adds an assertIn method to allow unit tests to pass in python 2.6.

Change-Id: Id0bce7fbfec7183a0ab401f627bedc791e535450
This commit is contained in:
Major Hayden 2012-02-06 08:18:21 -06:00
parent 913179fcba
commit f30694635c

View File

@ -41,3 +41,7 @@ class BaseTest(unittest.TestCase):
repr(exception)))
except exception as error:
self.assertIn(message, str(error))
def assertIn(self, test_value, expected_set):
msg = "%s did not occur in %s" % (test_value, expected_set)
self.assert_(test_value in expected_set, msg)