o
    Dh                     @   s,   d dl Z ddlT dd Zdd Zdd	 ZdS )
    N   )*c                  C   sv  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 s)w   Y  tt t dg W d    n1 sCw   Y  tt} t dg W d    n1 s]w   Y  dt| jv skJ tt t dg W d    n1 sw   Y  tt t dg W d    n1 sw   Y  tt t d	g W d    n1 sw   Y  tt} t d
g W d    n1 sw   Y  dt| jv sJ tt t dg W d    n1 sw   Y  tt t dg W d    n	1 sw   Y  tt t dg W d    n	1 s'w   Y  tt t dg W d    n	1 sBw   Y  tt t dg W d    n	1 s]w   Y  tt t dg W d    n	1 sxw   Y  t dgdgksJ tt t dg W d    n	1 sw   Y  tt t dg W d    n	1 sw   Y  tt t ddg W d    n	1 sw   Y  t dgdgksJ t dgdgksJ tt} t dg W d    n	1 sw   Y  | jjdksJ tt} t ddg W d    n	1 s+w   Y  | jjdks9J 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)s   content-length   1)r	   asdf)r	   1x)r	   2)Transfer-Encodingchunked)s   transfer-encodings   chunked)r   cHuNkEd)r   gzipi  )normalize_and_validatepytestraisesLocalProtocolErrorstrvalueerror_status_hint)excinfo r   Q/var/www/html/env_mimamsha/lib/python3.10/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 s1w   Y  | g dks>J t| d	d
g | g dksMJ d S )N))
Connectionclose)whatever	something)
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   get_comma_headerset_comma_headerr   r   r   )headersr   r   r   test_get_set_comma_headerK   s   r2   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s,J t| ddddgd	d
r:J d S )Nr   RequestGET/)Hostzexample.com)Expectz100-continue)methodtargetr1   )r8   z100-Continuez1.0)r9   r:   r1   http_version)_eventsr4   has_expect_100_continuer3   r   r   r   test_has_100_continuen   s4   r>   )r   _headersr   r2   r>   r   r   r   r   <module>   s
    E#