
    qh                     \    S SK JrJr  SrSr " S S5      r " S S\5      r " S S	\5      rg
)   )BaseStrategyBaseTemplateStrategyzhttp://myapp.comz	myapp.comc                       \ rS rSrS rSrg)Redirect   c                     Xl         g Nurlselfr   s     L/var/www/html/env/lib/python3.13/site-packages/social_core/tests/strategy.py__init__Redirect.__init__   s        r
   N)__name__
__module____qualname____firstlineno__r   __static_attributes__ r   r   r   r      s    r   r   c                   $    \ rS rSrSrS rS rSrg)TestTemplateStrategy   Fc                     U$ r	   r   )r   tplcontexts      r   render_template$TestTemplateStrategy.render_template   s    
r   c                     U$ r	   r   )r   htmlr   s      r   render_string"TestTemplateStrategy.render_string   s    r   r   N)r   r   r   r   __test__r   r"   r   r   r   r   r   r      s    Hr   r   c                      ^  \ rS rSrSr\rSU 4S jjrS rS r	S r
SS jrSS jrS	 rS
 rS rS rS rS rSS jrS rS rSS jrS rS rS rU 4S jrSS jrSrU =r$ )TestStrategy   Fc                 N   > 0 U l         0 U l        0 U l        [        TU ]  X5        g r	   )_request_data	_settings_sessionsuperr   )r   storager   	__class__s      r   r   TestStrategy.__init__   s&    &r   c                     [        U5      $ r	   )r   r   s     r   redirectTestStrategy.redirect!   s    }r   c                      U R                   U   $ )z#Return value for given setting name)r*   r   names     r   get_settingTestStrategy.get_setting$   s    ~~d##r   c                     U$ )z'Return HTTP response with given contentr   )r   contents     r   r!   TestStrategy.html(   s    r   c                     U=(       d    U$ )z4Render given template or raw html with given contextr   )r   r   r!   r   s       r   render_htmlTestStrategy.render_html,   s    {dr   c                     U R                   $ )z)Return current request data (POST or GET))r)   )r   merges     r   request_dataTestStrategy.request_data0   s    !!!r   c                     [         $ )zReturn current host value)	TEST_HOSTr   s    r   request_hostTestStrategy.request_host4   s    r   c                     g)zIs the request using HTTPS?Fr   rD   s    r   request_is_secureTestStrategy.request_is_secure8   s    r   c                     g)zpath of the current request r   rD   s    r   request_pathTestStrategy.request_path<       r   c                     g)zPort in use for this requestP   r   rD   s    r   request_portTestStrategy.request_port@   rN   r   c                 6    U R                   R                  5       $ )zRequest GET datar)   copyrD   s    r   request_getTestStrategy.request_getD       !!&&((r   c                 6    U R                   R                  5       $ )zRequest POST datarT   rD   s    r   request_postTestStrategy.request_postH   rX   r   c                 8    U R                   R                  X5      $ )z"Return session value for given key)r+   get)r   r5   defaults      r   session_getTestStrategy.session_getL   s    }}  //r   c                      X R                   U'   g)zSet session value for given keyN)r+   )r   r5   values      r   session_setTestStrategy.session_setP   s    #dr   c                 :    U R                   R                  US5      $ )zPop session value for given keyN)r+   popr4   s     r   session_popTestStrategy.session_popT   s    }}  t,,r   c                 Z    U=(       d    SnUR                  S5      (       a  U$ [        U-   $ )z-Build absolute URI with given (optional) pathrK   )zhttp://zhttps://)
startswithTEST_URI)r   paths     r   build_absolute_uriTestStrategy.build_absolute_uriX   s*    zr??233K$r   c                 :    U R                   R                  U5        g r	   )r*   update)r   valuess     r   set_settingsTestStrategy.set_settings_   s    f%r   c                 \    U R                   R                  U5        U R                   Ul        g r	   )r)   rp   data)r   rq   backends      r   set_request_dataTestStrategy.set_request_datab   s#    !!&)))r   c                 <    U R                   R                  US 5        g r	   )r)   rf   r4   s     r   remove_from_request_data%TestStrategy.remove_from_request_dataf   s    tT*r   c                    > [         TU ]  " U0 UD6n[        X0R                  R                  R                  5       5      (       a  U R                  SUR                  5        U$ )Nusername)r,   authenticate
isinstancer-   user
user_modelrc   r}   )r   argskwargsr   r.   s       r   r~   TestStrategy.authenticatei   sN    w#T4V4dLL--88:;;Z7r   c                 (    U R                  SSU5      $ )NPIPELINE)
z/social_core.pipeline.social_auth.social_detailsz+social_core.pipeline.social_auth.social_uidz-social_core.pipeline.social_auth.auth_allowedz,social_core.pipeline.social_auth.social_userz&social_core.pipeline.user.get_usernamez3social_core.pipeline.social_auth.associate_by_emailz%social_core.pipeline.user.create_userz/social_core.pipeline.social_auth.associate_userz0social_core.pipeline.social_auth.load_extra_dataz&social_core.pipeline.user.user_details)setting)r   rv   s     r   get_pipelineTestStrategy.get_pipelineo   s     || 
 	
r   )r)   r+   r*   r	   )NNN)T)r   r   r   r   r$   r   DEFAULT_TEMPLATE_STRATEGYr   r1   r6   r!   r<   r@   rE   rH   rL   rQ   rV   rZ   r_   rc   rg   rm   rr   rw   rz   r~   r   r   __classcell__)r.   s   @r   r&   r&      s|    H 4'$"))0$-&*+
 
r   r&   N)strategyr   r   rk   rC   r   r   r&   r   r   r   <module>r      s7    9	 
/ i
< i
r   