U
    ¶[Öe©$  ã                   @   sD   d dl Z d dlmZ d dlmZ G dd„ deƒZG dd„ deƒZdS )é    N)Ú	urlencode)Ú
OAuth1Testc                *   @   s  e Zd ZdZdZdZe dddœ¡Ze	ddddœƒZ
e d	d
ddd	ddg iiddddddd	dd	dd	dd	dddd
dddg g g dœdddddddddœd	ddd d
dddd!d"gdd#d$d%d&œgg g dœddddddddd'œd(d)d*d+d,d-d.d	d	d/d0dd1d	d2d%d	dd3d	d4d	d	d	d5œ'¡Zd6d7„ Zd8d9„ ZdS ):ÚTwitterOAuth1Testú$social.backends.twitter.TwitterOAuthz;https://api.twitter.com/1.1/account/verify_credentials.jsonÚfoobarÚbearer©Zaccess_tokenÚ
token_typeúfoobar-secretÚtrue©Zoauth_token_secretZoauth_tokenZoauth_callback_confirmedFTé!š úFoo bar baz quxÚdescriptionÚurlsúYhttps://twimg0-a.akamaihd.net/profile_images/532018826/n587119531_1939735_9305_normal.jpgÚ252429Ú666666éM   Ú181A1EÚFoolandé   NÚwebú"Foo foo foo fooúFri Dec 21 18:12:00 +0000 2012ì   sÝ*›p6©Zuser_mentionsZhashtagsr   Ú101010101010101010é   ©Ú	favoritedÚcontributorsÚ	truncatedÚsourceÚtextÚ
created_atÚ	retweetedÚin_reply_to_status_idÚcoordinatesÚidÚentitiesÚin_reply_to_status_id_strÚplaceÚid_strÚin_reply_to_screen_nameÚretweet_countÚgeoÚin_reply_to_user_id_strÚin_reply_to_user_idúRT @foo: "Foo foo foo fooúFri Dec 21 18:24:10 +0000 2012é   é
   ÚfooÚ10101010ÚFoo©Úindicesr)   Úscreen_namer-   Úname©r    r!   Zretweeted_statusr"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   éÐÕÿÿé¿   Ú1A1B1Fé—   ú9https://twimg0-a.akamaihd.net/images/themes/theme9/bg.gifÚ2FC2EFúOhttp://a0.twimg.com/profile_images/532018826/n587119531_1939735_9305_normal.jpgÚ74313638ú/http://a0.twimg.com/images/themes/theme9/bg.gifÚené   úTue Sep 15 00:26:17 +0000 2009úBuenos Aires)'Úfollow_request_sentÚprofile_use_background_imager)   r   Úverifiedr*   Úprofile_image_url_httpsÚprofile_sidebar_fill_colorÚprofile_text_colorÚfollowers_countÚprofile_sidebar_border_colorÚlocationÚdefault_profile_imageÚlisted_countÚstatusÚ
utc_offsetÚstatuses_countÚprofile_background_colorÚfriends_countÚ"profile_background_image_url_httpsÚprofile_link_colorÚprofile_image_urlÚis_translatorÚgeo_enabledr-   Úprofile_background_image_urlr<   ÚlangÚprofile_background_tileÚfavourites_countr=   ÚnotificationsÚurlr%   Úcontributors_enabledÚ	time_zoneÚ	protectedÚdefault_profileÚ	followingc                 C   s   |   ¡  d S ©N)Údo_login©Úself© rp   úd/var/www/html/services/stratfitenv/lib/python3.8/site-packages/social/tests/backends/test_twitter.pyÚ
test_login   s    zTwitterOAuth1Test.test_loginc                 C   s   |   ¡  d S rl   ©Zdo_partial_pipelinern   rp   rp   rq   Útest_partial_pipeline‚   s    z'TwitterOAuth1Test.test_partial_pipeline©Ú__name__Ú
__module__Ú__qualname__Úbackend_pathZuser_data_urlZexpected_usernameÚjsonÚdumpsZaccess_token_bodyr   Zrequest_token_bodyZuser_data_bodyrr   rt   rp   rp   rp   rq   r      sÚ   þý ÿÿýéû÷Ê8™jr   c                +   @   s   e Zd ZdZdZdZe dddœ¡Ze	ddddœƒZ
e d	d
ddd	ddg iiddddddd	dd	dd	dd	dddd
dddg g g dœdddddddddœd	ddd d
dddd!d"gdd#d$d%d&œgg g dœddddddddd'œd(d)d*d+d,d-d.d	d	d/d0dd1d	d2d%d	dd3d	d4d	d	d	d5d6œ(¡Zd7d8„ Zd9d:„ ZdS );ÚTwitterOAuth1IncludeEmailTestr   zNhttps://api.twitter.com/1.1/account/verify_credentials.json?include_email=truer   r   r   r
   r   r   FTr   r   r   r   r   r   r   r   r   r   r   Nr   r   r   r   r   r   r   r   r3   r4   r5   r6   r7   r8   r9   r:   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   úfoo@bar.bas)(rL   rM   r)   r   rN   r*   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   r-   ra   r<   rb   rc   rd   r=   re   rf   r%   rg   rh   ri   rj   rk   Úemailc                 C   s   |   ¡ }|  |jd¡ d S )Nr}   )rm   ZassertEqualsr~   )ro   Úuserrp   rp   rq   rr   ÿ   s    z(TwitterOAuth1IncludeEmailTest.test_loginc                 C   s   |   ¡  d S rl   rs   rn   rp   rp   rq   rt     s    z3TwitterOAuth1IncludeEmailTest.test_partial_pipelineru   rp   rp   rp   rq   r|   †   sÜ   þý ÿÿýéû÷Ê8˜kr|   )rz   Z	social.p3r   Zsocial.tests.backends.oauthr   r   r|   rp   rp   rp   rq   Ú<module>   s   