Пример #1
0
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()
Пример #2
0
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()
Пример #3
0
    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)
Пример #4
0
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()
Пример #5
0
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()