class AuthorizeTestCase(OAuthTestCase): def setUp(self): super(AuthorizeTestCase, self).setUp() self.redirect_uri = RedirectUri(client=self.oauth_client, url="http://localhost/redirect_endpoint/") self.redirect_uri.save()
class AuthorizeTestCase(OAuthTestCase): def setUp(self): super(AuthorizeTestCase, self).setUp() self.redirect_uri = RedirectUri( client=self.oauth_client, url="http://localhost/redirect_endpoint/") self.redirect_uri.save()
def test_unicode(self): client = Client(name="Test Client", access_host="http://localhost/") client.save() uri = RedirectUri(client=client, url="http://localhost/redirect_endpoint") uri.save() self.assertEqual(unicode(uri), uri.url)
class ApprovalTestCase(OAuthTestCase): def setUp(self): super(ApprovalTestCase, self).setUp() self.redirect_uri = RedirectUri(client=self.oauth_client, url="http://localhost/redirect_endpoint/") self.redirect_uri.save() self.authorization_code = AuthorizationCode(client=self.oauth_client, redirect_uri=self.redirect_uri) self.authorization_code.save() self.authorization_code.scope = [self.scope] self.authorization_code.save()
class ApprovalTestCase(OAuthTestCase): def setUp(self): super(ApprovalTestCase, self).setUp() self.redirect_uri = RedirectUri( client=self.oauth_client, url="http://localhost/redirect_endpoint/") self.redirect_uri.save() self.authorization_code = AuthorizationCode( client=self.oauth_client, redirect_uri=self.redirect_uri) self.authorization_code.save() self.authorization_code.scope = [self.scope] self.authorization_code.save()