3
rd‘  ã               @   s(   d dl mZ dd„ Zdd„ Zdd„ ZdS )	é    )Úxpassc              C   sX   t dƒ dddg} tj| ƒdks$t‚ddg}tj|ƒd ks>t‚g }tj|ƒd ksTt‚d S )NzTesting find_plus_lineÚhelloz+hello worldÚ zhello world)Úprintr   Zfind_plus_lineÚAssertionError)ÚtestZtest2Ztest3© r   ú9/tmp/pip-build-7vycvbft/pyxnat/pyxnat/tests/xpass_test.pyÚtest_find_plus_line   s    
r
   c              C   s8   t dƒ d} tjd| ƒdks t‚tjd| ƒd ks4t‚d S )NzTesting find_tokenzhello,worldú,r   Úworldú )r   r   )r   r   Z
find_tokenr   )Ústrr   r   r	   Útest_find_token   s    r   c              C   sº   t dƒ d} d}d}d}d}d}d}tj| |gƒ}|d	d
ddœksFt‚tj|gƒ}|d	d
ddœksft‚tj|gƒd kszt‚tj|gƒd ksŽt‚tj|gƒd ks¢t‚tj|gƒd ks¶t‚d S )NzTesting parse_xnat_passr   z"+user@localhost:8080/xnat=passwordz'+user@localhost:8080/xnat=password     z!user@localhost:8080/xnat=passwordz+@localhost:8080/xnat=passwordz+user=passwordz+user@localhost:8080/xnatÚpasswordzlocalhost:8080/xnatÚuser)ÚpÚhostÚu)r   r   Zparse_xnat_passr   )ZnothingLineÚlineZlineWithSpacesZlineWithoutPlusZlineWithoutUserZlineWithoutHostZlineWithoutPassZxpr   r   r	   Útest_parse_xnat_pass   s     r   N)Zpyxnatr   r
   r   r   r   r   r   r	   Ú<module>   s   
