a
    
d                     @   s,   d dl Z ddlT dd Zdd Zdd	 ZdS )
    N   )*c                  C   s  t dgdgksJ t dgdgks(J tt t dg W d    n1 sR0    Y  tt t dg W d    n1 s0    Y  tt} t dg W d    n1 s0    Y  dt| jv sJ tt t dg W d    n1 s0    Y  tt t dg W d    n1 s80    Y  tt t d	g W d    n1 sn0    Y  tt} t d
g W d    n1 s0    Y  dt| jv sJ tt t dg W d    n1 s0    Y  tt t dg W d    n1 s$0    Y  tt t dg W d    n1 sZ0    Y  tt t dg W d    n1 s0    Y  tt t dg W d    n1 s0    Y  tt t dg W d    n1 s0    Y  t dgdgksJ tt t dg W d    n1 sH0    Y  tt t dg W d    n1 s~0    Y  tt t ddg W d    n1 s0    Y  t ddgdgksJ t dgdgksJ tt t g d W d    n1 s0    Y  tt t dg W d    n1 sR0    Y  t dgdgksrJ t dgdgksJ tt} t dg W d    n1 s0    Y  | jjd ksJ tt} t ddg W d    n1 s0    Y  | jjd ksJ d S )!N)foobar)   foo   bar)s   foo r   )s    foor   )s   foo bar   bazzfoo bar)s   foo barr   )s   foobarr   )s   foobarr   )r   zbarbazzbar\rbaz)r   zbar
baz)r   zbar baz)r   zbarbaz  )r   z  barbaz)r   zbarbaz	)r   z	barbazContent-Length1)   content-length   1)r
   Zasdf)r
   Z1xr
   2)r
   0)r      0)r
   z0 , 0)r	   r	   r   )r
   z1 , 1,2)Transfer-Encodingchunked)s   transfer-encodings   chunked)r   ZcHuNkEd)r   gzipi  )normalize_and_validatepytestraisesLocalProtocolErrorstrvalueZerror_status_hint)excinfo r   _/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/h11/tests/test_headers.pytest_normalize_and_validate   s    (((************,
$**$r   c                  C   s   t g d} t| dg dks"J t| dddg} tt  t| dddg W d    n1 sb0    Y  | g dks|J t| d	d
g} | g dksJ d S )N))
Connectionclose)ZwhateverZ	something)Z
connectiONzfOo,, , BAR
   connection)   closer   r      newthingabz  a)r!   r"   )   whatevers	   somethingr!   s   fOo,, , BARr#      ar#      br'   zdifferent thing)r&   r(   r)   r+   )r'   s   different thing)r   Zget_comma_headerZset_comma_headerr   r   r   )headersr   r   r   test_get_set_comma_headerW   s    .r.   c                  C   sx   ddl m}  t| ddddgds&J t| dddgdr>J t| ddddgdsXJ t| ddddgd	d
rtJ d S )Nr   RequestGET/)Hostzexample.com)Expectz100-continue)methodtargetr-   )r4   z100-Continuez1.0)r5   r6   r-   http_version)Z_eventsr0   Zhas_expect_100_continuer/   r   r   r   test_has_100_continuez   s4    r8   )r   _headersr   r.   r8   r   r   r   r   <module>   s   Q#