def test_raise_redirect_exception(self): apiurl = "http://api.reddit.com/" oauthurl = "http://oauth.reddit.com/" def raise_redirect_exception(): raise errors.RedirectException(apiurl, oauthurl) self.assertRaises(errors.RedirectException, raise_redirect_exception) redirect_exception = errors.RedirectException(apiurl, oauthurl) self.assertEqual(redirect_exception.message, str(redirect_exception))
def raise_redirect_exception(): raise errors.RedirectException(apiurl, oauthurl)