
    qiK                         S r SSKrSSKrSSKJrJr  \R                  R                  SS5      S 5       r\R                  S 5       r
\R                  R                  SS	5      S
 5       rg)zCTests to verify the command line interface.

.. spelling::

   cli
    N)Applicationparse_wsgi_bind_addrraw_bind_addrexpected_bind_addr)	)z192.168.1.1:80)z192.168.1.1P   )z
[::1]:8000)z::1i@  )zlocalhost:5000)	localhost  )zfoo@bar:5000)barr
   )foo)r   N)	123456789)r   N)/tmp/cheroot.sockr   )/tmp/some-random-file-namer   )z@cherootz cherootc                 &    [        U 5      U:X  d   eg)zoCheck the parsing of the --bind option.

Verify some of the supported addresses and the expected return value.
N)r   r   s     J/home/kali/flask_env/lib/python3.13/site-packages/cheroot/test/test_cli.pytest_parse_wsgi_bind_addrr      s    <  .2DDDD    c                 j     " S S5      nU" 5       nU R                  [        R                  SU5        U$ )zReturn a WSGI app stub.c                   $    \ rS rSrSrS rS rSrg)wsgi_app.<locals>.WSGIAppMock7   zMock of a wsgi module.c                     g)zEmpty application method.

Default method to be called when no specific callable
is defined in the wsgi application identifier.

It has an empty body because we are expecting to verify that
the same method is return no the actual execution of it.
N selfs    r   application)wsgi_app.<locals>.WSGIAppMock.application:       r   c                     g)zEmpty custom method (callable) inside the mocked WSGI app.

It has an empty body because we are expecting to verify that
the same method is return no the actual execution of it.
Nr   r   s    r   main"wsgi_app.<locals>.WSGIAppMock.mainD   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   r    __static_attributes__r   r   r   WSGIAppMockr   7   s    $		r   r(   
mypkg.wsgi)setitemsysmodules)monkeypatchr(   apps      r   wsgi_appr/   3   s2     ( -C \37Jr   )app_name
app_method))Nr   )r   r   )r    r    c                     U c  SnOSR                   " S0 [        5       D6n[        X!5      n[        R                  " U5      R
                  U:X  d   eg)z+Check the wsgi application name conversion.Nr)   zmypkg.wsgi:{app_name}r   )formatlocalsgetattrr   resolver/   )r0   r1   r/   wsgi_app_specexpected_apps        r   test_Aplication_resolver9   R   sM     $/66BB80L}-66,FFFr   )r&   r+   pytestcheroot.clir   r   markparametrizer   fixturer/   r9   r   r   r   <module>r?      s      +2E32E  < GGr   