Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
auth_test.cpython-313.pyc117 linesDownload Raw Back to __pycache__
1�

2��jo]����SSKrSSKJrJrJrJrJrJr SSKJ	r	 SSK3Jr SSKJ
r
 SSKJr SSKJr SSKJrJr SS	KJrJrJr SS4KJr "SS\\5r"S
S\5r"SS\\5r"SS\5r"SS\\5r"SS\5r "SS\5r!"SS\\5r""SS\\5r#"SS\5r$"SS \5r%"S!S"\\5r&"S#S$\&5r'"S%S&\&5r("S'S(\&5r)"S)S*\&5r*"S+S,\5r+"S-S.\5r,"S/S0\5r-"S1S2\5r."S3S4\\5r/"S5S6\5r0"S7S8\5r1"S9S:\5r2"S;S<\5r3g!\a SrGN&f=f)=�N)�OpenIdMixin�5OAuthMixin�OAuth2Mixin�GoogleOAuth2Mixin�FacebookGraphMixin�TwitterMixin)�json_decode)�gen)�HTTPClientError)�6url_concat)�app_log)�AsyncHTTPTestCase�	ExpectLog)�RequestHandler�Application�	HTTPError)�mockc�>�\rSrSrSr\RS5rSrg)�OpenIdClientLoginHandler�c�0�URS5Ulg)N�/openid/server/authenticate)�get_url�_OPENID_ENDPOINT��self�tests  �\D:\code\apps\devtools\python\user_packages\Python313\site-packages\tornado/test/auth_test.py�7initialize�#OpenIdClientLoginHandler.initializes�� $���-J� K���c#��# �URSS5(a>URURSS9v�nUc[S5eUR	U5 gUR5nUbeg7f)N�openid.mode�http_client�r$�user is None)�get_argument�get_authenticated_user�settings�	Exception�finish�authenticate_redirect)r�user�ress   r�get�OpenIdClientLoginHandler.get"sw������]�D�1�1��4�4� �M�M�-�8�5���D��|���/�/��K�K�����(�(�*���{��{�s�A,A.)rN�	�__name__�8__module__�__qualname__�__firstlineno__rr9�	coroutiner/�__static_attributes__�r!rrrs ��L�	�]�]�10��11r!rc��\rSrSrSrSrg)�OpenIdServerAuthenticateHandler�0c�f�URS5S:wa[S5eURS5 g)Nr#�check_authenticationzincorrect openid.mode %rz
is_valid:true)r'r*�write�rs r�post�$OpenIdServerAuthenticateHandler.post1s.�����]�+�/E�E��6�7�7��12�13�?�#r!r8N�r2r3r4r5r@r7r8r!rr:r:0s��$r!r:c�h�\rSrSrSrSr\RS5r\RS5r	Sr14g)�OAuth1ClientLoginHandler�7c��X lURS5UlURS5UlURS5Ulg)N�/oauth1/server/request_token�/oauth1/server/authorize�/oauth1/server/access_token)�_OAUTH_VERSIONr�_OAUTH_REQUEST_TOKEN_URL�_OAUTH_AUTHORIZE_URL�_OAUTH_ACCESS_TOKEN_URL)rr�versions   rr�#OAuth1ClientLoginHandler.initialize8s>��%��(,���5S�(T��%�$(�L�L�1K�$L��!�'+�|�|�4Q�'R��$r!c��[SSS9$�N�asdf�qwer��key�secret��dictr?s r�_oauth_consumer_token�.OAuth1ClientLoginHandler._oauth_consumer_token>�����v�.�.r!c#��# �URSS5(a>URURSS9v�nUc[S5eUR	U5 gURURSS9v� g7f)N�oauth_tokenr$r%r&)r'r(r)r*r+�authorize_redirect�rr-s  rr/�OAuth1ClientLoginHandler.getAs|������]�D�1�1��4�4� �M�M�-�8�5���D��|���/�/��K�K�����%�%�$�-�-�
�2N�%�O�O�s�A5A7c��URSS5(a[S5eU[SSS9:wa[SU-5e[SS9$)	N�fail_in_get_userzfailing in get_user�uiop�5678rTzincorrect access token %r�foo@example.com)�email)r'r*rX)r�access_tokens  r�_oauth_get_user_future�/OAuth1ClientLoginHandler._oauth_get_user_futureMsN�����/��6�6��1�2�2��4�F�6�:�:��7�,�F�G�G��+�,�,r!)rMrLrKrJN)r2r3r4r5rrYr15r6r/rhr7r8r!rrDrD7s?��S�/�	�]�]�	P��	P�	�]�]�-��-r!rDc�<�\rSrSrSr\RS5rSrg)�!OAuth1ClientLoginCoroutineHandler�VzDReplaces OAuth1ClientLoginCoroutineHandler's get() with a coroutine.c#��# �URSS5(aUR5v� gUR5v� g![a/nURS5 UR	SU-5 SnAgSnAff=f7f)Nr]��zgot exception: %s)r'r(r*�16set_statusr>r^)r�es  rr/�%OAuth1ClientLoginCoroutineHandler.getYso������]�D�1�1�
4��1�1�3�3�17�)�)�+�+��	�
4�����$��18�19�.��2�3�3��
4�s-�A=�A�A=�20A:�%A5�0A=�5A:�:A=r8N)	r2r3r4r5�__doc__r21r6r/r7r8r!rrkrkVs��N��]�]�22,��23,r!rkc�&�\rSrSrSrSrSrSrg)�$OAuth1ClientRequestParametersHandler�gc��Xlg�N�rJ)rrNs  rr�/OAuth1ClientRequestParametersHandler.initializehs��%�r!c��[SSS9$rQrWr?s rrY�:OAuth1ClientRequestParametersHandler._oauth_consumer_tokenkr[r!c�f�URS[SSS9[SS9S9nURU5 g)Nzhttp://www.example.com/api/asdfrcrdrT�bar)�foo)�24parameters)�_oauth_request_parametersrXr>)r�paramss  rr/�(OAuth1ClientRequestParametersHandler.getns9���/�/�-��V�F�+����0�25��26	
�27�28�6�r!rxN)r2r3r4r5rrYr/r7r8r!rrtrtgs��&�/�r!rtc��\rSrSrSrSrg)�OAuth1ServerRequestTokenHandler�wc�&�URS5 g)Nz(oauth_token=zxcv&oauth_token_secret=1234�r>r?s rr/�#OAuth1ServerRequestTokenHandler.getx����29�30�=�>r!r8N�r2r3r4r5r/r7r8r!rr�r�w���?r!r�c��\rSrSrSrSrg)�OAuth1ServerAccessTokenHandler�|c�&�URS5 g)Nz(oauth_token=uiop&oauth_token_secret=5678r�r?s rr/�"OAuth1ServerAccessTokenHandler.get}r�r!r8Nr�r8r!rr�r�|r�r!r�c� �\rSrSrSrSrSrg)�OAuth2ClientLoginHandler�c�0�URS5Ulg)Nz/oauth2/server/authorize)rrLrs  rr�#OAuth2ClientLoginHandler.initialize�s��$(�L�L�1K�$L��!r!c�.�UR5nUbegrw)r^)rr.s  rr/�OAuth2ClientLoginHandler.get�s���%�%�'���{��{r!)rLN)r2r3r4r5rr/r7r8r!rr�r��s
��M�r!r�c�>�\rSrSrSr\RS5rSrg)�FacebookClientLoginHandler�c��URS5UlURS5UlURS5Ulg)Nz/facebook/server/authorize�/facebook/server/access_tokenz/facebook/server)rrLrM�_FACEBOOK_BASE_URLrs  rr�%FacebookClientLoginHandler.initialize�s8��$(�L�L�1M�$N��!�'+�|�|�4S�'T��$�"&�,�,�/A�"B��r!c#�x# �URSS5(agURURR5URSURSURS5S9v�nURU5 gUR
URR5URSSS0S9 g7f)N�code�facebook_api_key�facebook_secret)�redirect_uri�	client_id�
client_secretr��scopezread_stream,offline_access)r�r��extra_params)r'r(�request�full_urlr)r>r^r_s  rr/�FacebookClientLoginHandler.get�s�������V�T�*�*��4�4�!�\�\�2�2�4��-�-�(:�;�"�m�m�,=�>��&�&�v�.�	5���D�
�J�J�t���#�#�!�\�\�2�2�4��-�-�(:�;�%�'C�D�
$�
�s�B8B:)r�rMrLNr1r8r!rr�r��s ��C�31	�]�]���r!r�c��\rSrSrSrSrg)� FacebookServerAccessTokenHandler�c�6�UR[SSS95 g)NrRi�rg�32expires_in)r>rXr?s rr/�$FacebookServerAccessTokenHandler.get�s���33�34�4�V��=�>r!r8Nr�r8r!rr�r��r�r!r�c��\rSrSrSrSrg)�FacebookServerMeHandler�c�&�URS5 g)Nz{}r�r?s rr/�FacebookServerMeHandler.get�s���35�36�4�r!r8Nr�r8r!rr�r��s��r!r�c� �\rSrSrSrSrSrg)�TwitterClientHandler�c���URS5UlURS5UlURS5UlURS5UlURS5Ulg)NrG�/twitter/server/access_tokenrHz/twitter/server/authenticatez/twitter/api)rrKrMrL�_OAUTH_AUTHENTICATE_URL�_TWITTER_BASE_URLrs  rr�TwitterClientHandler.initialize�s[��(,���5S�(T��%�'+�|�|�4R�'S��$�$(�L�L�1K�$L��!�'+�|�|�4R�'S��$�!%���n�!=��r!c� �URS$)Nr$)r)r?s r�get_auth_http_client�)TwitterClientHandler.get_auth_http_client�s���}�}�]�+�+r!)rMr�rLrKr�N)r2r3r4r5rr�r7r8r!rr�r��s��>�,r!r�c�8�\rSrSr\R37S5rSrg)�TwitterClientLoginHandler�c#��# �URSS5(a2UR5v�nUc[S5eURU5 gUR	5v� g7f�Nr]r&)r'r(r*r+r^r_s  rr/�TwitterClientLoginHandler.get�sW������]�D�1�1��4�4�6�6�D��|���/�/��K�K�����%�%�'�'���AAr8N�r2r3r4r5r38r6r/r7r8r!rr�r��s���]�]�(��(r!r�c�8�\rSrSr\R39S5rSrg)� TwitterClientAuthenticateHandler��c#��# �URSS5(a2UR5v�nUc[S5eURU5 gUR	5v� g7fr�)r'r(r*r+r,r_s  rr/�$TwitterClientAuthenticateHandler.get�sW������]�D�1�1��4�4�6�6�D��|���/�/��K�K�����(�(�*�*�r�r8Nr�r8r!rr�r��s��	�]�]�+��+r!r�c�8�\rSrSr\R40S5rSrg)�%TwitterClientLoginGenCoroutineHandler��c#�# �URSS5(a$UR5v�nURU5 gUR5v� g7f)Nr])r'r(r+r^r_s  rr/�)TwitterClientLoginGenCoroutineHandler.get�sF������]�D�1�1��4�4�6�6�D��K�K����)�)�+�+�s�AAr8Nr�r8r!rr�r��s���]�]�,��,r!r�c�8�\rSrSr\R41S5rSrg)�TwitterClientShowUserHandler��c#��# �URSURS5-[SSS9S9v�nURU5 g![a% URS5 URS5 gf=f7f)	Nz/users/show/%s�name�hjkl�vbnmrT�rg��zerror from twitter request)�twitter_requestr'rXr+rro�r�responses  rr/� TwitterClientShowUserHandler.get�sz���	"�!�1�1� �4�#4�#4�V�#<�<�!�f�V�<�2���H�
�K�K��!��
�	6�
�O�O�C� ��K�K�4�5�		6�s'�A4�,A�A4�,A1�.A4�0A1�1A4r8Nr�r8r!rr�r��s���]�]�"��"r!r�c��\rSrSrSrSrg)�TwitterServerAccessTokenHandler��c�&�URS5 g)Nz8oauth_token=hjkl&oauth_token_secret=vbnm&screen_name=foor�r?s rr/�#TwitterServerAccessTokenHandler.get�s���42�43�M�Nr!r8Nr�r8r!rr�r��s��Or!r�c��\rSrSrSrSrg)�TwitterServerShowUserHandler��c���US:Xa[S5eSURR;deSURR;deSURR;deURS5S:XdeURS5S	:XdeURS445S:XdeURS5S
:XdeUR	[XR
5S95 g)N�errorr��oauth_nonce�oauth_timestamp�oauth_signature�oauth_consumer_key�test_twitter_consumer_key�oauth_signature_method�	HMAC-SHA1�
oauth_version�1.0r]r���screen_namer�)rr��	argumentsr'r>rX�45capitalize)rr�s  rr/� TwitterServerShowUserHandler.get�s����'�!��C�.� ����� 6� 6�6�6�6� �D�L�L�$:�$:�:�:�:� �D�L�L�$:�$:�:�:�:�� � �!5�6�:U�U�U�U�� � �!9�:�k�I�I�I�� � ��1�U�:�:�:�� � ��/�6�9�9�9��46�47�4�K�6L�6L�6N�O�Pr!r8Nr�r8r!rr�r��s��48Qr!r�c��\rSrSrSrSrg)�%TwitterServerVerifyCredentialsHandleric��SURR;deSURR;deSURR;deURS5S:XdeURS5S:XdeURS5S	:XdeURS495S:XdeUR[	SS
S95 g)Nr�r�r�r�r�r�r�r�r�r]r�r~�Foor�)r�r�r'r>rXr?s rr/�)TwitterServerVerifyCredentialsHandler.gets������� 6� 6�6�6�6� �D�L�L�$:�$:�:�:�:� �D�L�L�$:�$:�:�:�:�� � �!5�6�:U�U�U�U�� � �!9�:�k�I�I�I�� � ��1�U�:�:�:�� � ��/�6�9�9�9��50�51�4�E��6�7r!r8Nr�r8r!rr�r�s��8r!r�c��\rSrSrSrSrSrSrSrSr	Sr52\R"\
S	LS535S5rSrS
rSrSrSrSrSrSrSrSrSrSrSrg	)�AuthTestic��[S[[US94S[[USS94S[[SS94S[[US	S94S54[55[US	S94S[[S	S94S[[US94S
[[US94S[[US94S[[US94S[[US94S[[US94S[4S[4S[4S[4S[ 4S["4S[$4S[&4/UR(SSSSS9$)N�/openid/client/login�r�/oauth10/client/loginr�)rrN�/oauth10/client/request_params)rN�/oauth10a/client/loginz1.0az /oauth10a/client/login_coroutine�/oauth10a/client/request_params�/oauth2/client/login�/facebook/client/login�/twitter/client/login�/twitter/client/authenticate�#/twitter/client/login_gen_coroutinez/twitter/client/show_userrrGrIr�z/facebook/server/mer�z"/twitter/api/users/show/(.*)\.jsonz-/twitter/api/account/verify_credentials\.jsonr��test_twitter_consumer_secret�test_facebook_api_key�test_facebook_secret)r$�twitter_consumer_key�twitter_consumer_secretr�r�)rrrXrDrtrkr�r�r�r�r�r�r:r�r�r�r�r�r�r�r$r?s r�get_app�AuthTest.get_appsd���(�)A�4�T�?�S�+�,��d�E�2��5�8���'��-�,��d�F�3��7�5��d�F�3��6�8���(��56(�)A�4�T�?�S�)�+E�t�QU��W�(�*C�T�t�_�U�2�4��d�O��:�9��d�O��0�0��d�O��/�0O�P�/�1P�Q�.�0N�O�0�2R�S�&�(?�@�/�1P�Q�6�8T�U�D�9��m:
�v�(�(�!<�$B�4�2�AA57�A	58r!c��URSSS9nURURS5 URSURS5 g)NrF��follow_redirects�.z/openid/server/authenticate?�Location��fetch�assertEqualr��assertIn�headersr�s  r�test_openid_redirect�AuthTest.test_openid_redirectUsC���:�:�4�u�:�M���������,��
�
�4�h�6F�6F�z�6R�Sr!c��URS5nUR5 [UR5nUR	USS5 g)Nz�/openid/client/login?openid.mode=blah&openid.ns.ax=http://openid.net/srv/ax/1.0&openid.ax.type.email=http://axschema.org/contact/email&openid.ax.value.email=foo@example.comrfre�r�rethrowr	�bodyr�rr��parseds   r�test_openid_get_user�AuthTest.test_openid_get_userZsF���:�:�
5�59��	�����X�]�]�+��������*;�<r!c��URSSS9nURURS5 URURSRS55 UR
SURSURS5 g)	NrFrrr�)/oauth1/server/authorize?oauth_token=zxcv�(_oauth_request_token="enhjdg==|MTIzNA=="�60Set-Cookie�rrr��61assertTruer�endswithrr�s  r�test_oauth10_redirect�AuthTest.test_oauth10_redirectes~���:�:�5��:�N���������,�������Z�(�1�1�;�
�	62�	
�
�
�6����\�*����\�*�	63r!c���URSSS0S9nUR5 [UR5nUR	USS5 UR	US[SS	S6495 g)Nz&/oauth10/client/login?oauth_token=zxcv�Cookie�&_oauth_request_token=enhjdg==|MTIzNA==�rrfrergrcrdrT�rr!r	r"rrXr#s   r�test_oauth10_get_user�AuthTest.test_oauth10_get_usertsn���:�:�4��G�H��65��	�����X�]�]�+��������*;�<������/��&��1P�Qr!c��URS5nUR5 [UR5nUR	USS5 UR	USS5 URSU5 URSU5 g)Nrr�rRr]rcr�r��rr!r	r"rrr#s   r�test_oauth10_request_parameters�(AuthTest.test_oauth10_request_parameters~ss���:�:�>�?�������X�]�]�+������ 4�5�v�>�����
�.��7��
�
�m�V�,��
�
�'��0r!c��URSSS9nURURS5 URURSRS55 URSURS;URS5 g)	NrFrrrr(r)r*)rrr�r,rr-r�s  r�test_oauth10a_redirect�AuthTest.test_oauth10a_redirect�s����:�:�6��:�O���������,�������Z�(�1�1�;�
�	66�	
���6�����-�
.����\�*�	67r!Nzmock package not presentc�L�[RR[S5n[	S5Ul[
[S5 URSSS9nSSS5 URWRS5 SSS5 g!,(df   N3=f!,(df   g=f)Nr/�boomzUncaught exceptionrFrr�)r�patch�objectr�r*�side_effectrr
rrr�)rr/r�s   r�test_oauth10a_redirect_error�%AuthTest.test_oauth10a_redirect_error�sw��
�Z�Z�
�
�>��
F�#�'��/�C�O��7�$8�9��:�:�&>�QV�:�W��:����X�]�]�C�0�	G�
F�9�9��G�
F�s#�!B�B�$B�68B	�B�69B#c���URSSS0S9nUR5 [UR5nUR	USS5 UR	US[SS	S7095 g)Nz'/oauth10a/client/login?oauth_token=zxcvr1r2r3rfrergrcrdrTr4r#s   r�test_oauth10a_get_user�AuthTest.test_oauth10a_get_user�sn���:�:�5��G�H��71��	�����X�]�]�+��������*;�<������/��&��1P�Qr!c��URS5nUR5 [UR5nUR	USS5 UR	USS5 URSU5 URSU5 g)Nrr�rRr]rcr�r�r8r#s   r� test_oauth10a_request_parameters�)AuthTest.test_oauth10a_request_parameters�ss���:�:�?�@�������X�]�]�+������ 4�5�v�>�����
�.��7��
�
�m�V�,��
�
�'��0r!c�`�URSSS0S9nURURS5 g)NzG/oauth10a/client/login_coroutine?oauth_token=zxcv&fail_in_get_user=truer1r2r3rn)rrr�r�s  r�*test_oauth10a_get_user_coroutine_exception�3AuthTest.test_oauth10a_get_user_coroutine_exception�s7���:�:�U��G�H��72��	
�������,r!c��URSSS9nURURS5 URSURS5 g)NrFrrz/oauth2/server/authorize?rrr�s  r�test_oauth2_redirect�AuthTest.test_oauth2_redirect�sC���:�:�4�u�:�M���������,��
�
�1�8�3C�3C�J�3O�Pr!c�t�URSSS9nURURS5 URSURS;5 URSSS9nURURS5 [UR5nURUS	S735 URUSS5 g)
NrFrrz/facebook/server/authorize?rz /facebook/client/login?code=1234��rgrR�session_expires�3600)rrr�r,rr	r")rr�r-s   r�test_facebook_login�AuthTest.test_facebook_login�s����:�:�6��:�O���������,����5��9I�9I�*�9U�U�V��:�:�.���74��	
�������,��8�=�=�)������n�-�v�6�����/�0�&�9r!c��URUSS9nURURS5 URURSRS55 UR
SURSURS5 g)NFrrrr(r)r*r+)r�urlr�s   r�base_twitter_redirect�AuthTest.base_twitter_redirect�s}���:�:�c�E�:�:���������,�������Z�(�1�1�;�
�	75�	
�
�
�6����\�*����\�*�	76r!c�&�URS5 g)Nr	�rYr?s r�test_twitter_redirect�AuthTest.test_twitter_redirect�s���"�"�#:�;r!c�&�URS5 g)Nrr\r?s r�#test_twitter_redirect_gen_coroutine�,AuthTest.test_twitter_redirect_gen_coroutine�s���"�"�#H�Ir!c�,�URSSS9nURURS5 URURSRS5URS5 UR
SURSURS5 g)	Nr77Frrrz-/twitter/server/authenticate?oauth_token=zxcvr)r*r+r�s  r�"test_twitter_authenticate_redirect�+AuthTest.test_twitter_authenticate_redirect�s����:�:�<�u�:�U���������,�������Z�(�1�1�?�
�
���Z�(�		78�	
�
�
�6����\�*����\�*�	79r!c��URSSS0S9nUR5 [UR5nUR	USSSS.S	SSS80.5 g)Nz&/twitter/client/login?oauth_token=zxcvr1r2r3r�r~r�)rUr�rVr�)rgr�r��usernamer r#s   r�test_twitter_get_user�AuthTest.test_twitter_get_user�sn���:�:�4��G�H��81��	�����X�]�]�+������"�#(�$�!�82�$�!�	
�	83r!c��URS5nUR5 UR[UR5SSS.5 g)Nz'/twitter/client/show_user?name=somebody�Somebody�somebody)r�r�)rr!rr	r"r�s  r�test_twitter_show_user�AuthTest.test_twitter_show_users>���:�:�G�H�����������
�
�&��J�(W�	84r!c��URS5nURURS5 URURS5 g)Nz$/twitter/client/show_user?name=errorr�serror from twitter request)rrr�r"r�s  r�test_twitter_show_user_error�%AuthTest.test_twitter_show_user_errors:���:�:�D�E���������,�������(E�Fr!r8)r2r3r4r5rrr%r.r5r9r<�unittest�skipIfrrCrFrIrLrOrUrYr]r`rcrgrlror7r8r!rr�r�s���B85�HT�86	=�
87�R�1�
88��_�_�T�T�\�#=�>�1�?�1�R�1�-�Q�89 90:�91� <�J�92� 93�*94�Gr!r�c�>�\rSrSrSr\RS5rSrg)�GoogleLoginHandleric��XlURS5UlURS5UlURS5Ulg)N�
/client/login�/google/oauth2/authorize�/google/oauth2/token)rr�_OAUTH_REDIRECT_URIrLrMrs  rr�GoogleLoginHandler.initializes<���	�#'�<�<��#@�� �$(�L�L�1K�$L��!�'+�|�|�4J�'K��$r!c#�d# �URSS5nUbfURURU5v�nURURRS5USS9v�nUSUS'UR
U5 gURURURSSSS/SS	S950S9 g7f)Nr��/google/oauth2/userinforgr��google_oauthrU�profilerf�prompt�select_account)r�r�r��
response_typer�)	r'r(ry�oauth2_requestrrr>r^r))rr��accessr-s    rr/�GoogleLoginHandler.gets����� � ���.�����6�6�t�7O�7O�QU�V�V�F��,�,��	�	�!�!�";�<�#�N�3�-���D�96$*�.�#9�D�� ��J�J�t���#�#�!�5�5��-�-��7��>� �'�*�$�&�(8�9�
$�
�s�B.B0)rMrLryrNr1r8r!rrtrts ��L�	�]�]���r!rtc��\rSrSrSrSrg)�GoogleOAuth2AuthorizeHandleri/c	�j�SnUR[URS5[US955 g)N�fake-authorization-coder�)r�)�redirectrr'rX)rr�s  rr/� GoogleOAuth2AuthorizeHandler.get0s)��(���
�
�j��!2�!2�>�!B�D�d�O�T�Ur!r8Nr�r8r!rr�r�/s��Vr!r�c��\rSrSrSrSrg)�GoogleOAuth2TokenHandleri6c�Z�URS5S:XdeURSSS.5 g)Nr�r��fake-access-tokenz
never-expiresr��r'r+r?s rr@�GoogleOAuth2TokenHandler.post7s0��� � ��(�,E�E�E�E����0��P�	97r!r8NrBr8r!rr�r�6s��98r!r�c��\rSrSrSrSrg)�GoogleOAuth2UserinfoHandleri?c�Z�URS5S:XdeURSSS.5 g)Nrgr�r�re)r�rfr�r?s rr/�GoogleOAuth2UserinfoHandler.get@s.��� � ��0�4G�G�G�G����U�->�?�@r!r8Nr�r8r!rr�r�?s��Ar!r�c� �\rSrSrSrSrSrg)�GoogleOAuth2TestiFc�d�[S[[US94S[4S[4S[994/SSS.S	9$)100Nrvrrwrxr|�fake_google_client_id�fake_google_client_secretrT)r})rrtrXr�r�r�r?s rr�GoogleOAuth2Test.get_appGsM���!�"4�d��o�F�+�-I�J�'�)A�B�*�,G�H�

�/�5��
101�
	102r!c�x�URS5nURSSSS.[UR55 g)Nrvr�rer�)r�rfrg)r�assertDictEqualr	r"r�s  r�test_google_login�"GoogleOAuth2Test.test_google_loginWs:���:�:�o�.������*� 3�
�103
��
�
�&�
	104r!r8N)r2r3r4r5rr�r7r8r!rr�r�Fs��105� 	106r!r�)4rq�tornado.authrrrrrr�tornado.escaper	�tornador107�tornado.httpclientr�tornado.httputilr�tornado.logr
�tornado.testingrr�tornado.webrrrr�ImportErrorrr:rDrkrtr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rtr�r�r�r�r8r!r�<module>r�s������'��.�'��8�>�>���108�~�{��$$�n�$�-�~�z�-�>,�(@�,�"
�>�:�
� ?�n�?�109?�^�?�110�~�{����1C��0?�~�?�111�n��112	,�>�<�	,�	(� 4�	(�+�';�+�	,�,@�	,�"�#7�"�&O�n�O�113Q�>�Q�	8�N�	8�~G� �~G�B��):��<V�>�V�114�~�115�A�.�A�116�(�117��Y���D��s�E'�'E3�2E3
codekingpro/portable-devtools · Team Ai