def checkRaiseRegex(self, expected_exception, expected_regex):
    if (sys.version_info < (3, 0)):
        return self.assertRaisesRegexp(expected_exception, expected_regex)
    return self.assertRaisesRegex(expected_exception, expected_regex)
def checkRaiseRegex(self, expected_exception, expected_regex):
    if (sys.version_info < (3, 0)):
        return self.assertRaisesRegexp(expected_exception, expected_regex)
    return self.assertRaisesRegex(expected_exception, expected_regex)