コード例 #1
0
class TestAuthorizeModel(TestCase):
    def setUp(self):
        self.authentication = AuthenticationFactory()

    def test_raise_exception_on_invalid_access_token(self):
        response = json.dumps({'error': 'bad_verification_code'})
        with self.assertRaises(BadVerificationCode):
            with HTTMock(lambda url, request: response):
                self.authentication.get_access_token('derp')
コード例 #2
0
 def setUp(self):
     self.authentication = AuthenticationFactory()
コード例 #3
0
 def setUp(self):
     self.authorization = AuthenticationFactory()
     self.url = "?code=foo&state=%d" % self.authorization.pk