'Custom function to backport assertRaisesRegexp to all supported
versions of Python.'

def assert_raises_multi_regex(self, expected_exception, expected_regexp, callable_obj=None, *args, **kwargs):

    self.assertRaises(expected_exception, callable_obj, *args, **kwargs)
    try:
        callable_obj(*args)
    except facebook.GraphAPIError as error:
        self.assertEqual(error.message, expected_regexp)
