o
     Loj†  ã                   @   sj   d dl Z d dlZd dlmZmZ ddidddddd	id
œgdœZG dd„ dejƒZedkr3e 	¡  dS dS )é    N)Úindex_scriptÚpayload_for_webÚovertimeçffffffö?zlabor:0ÚFLSAzhttps://example.test/flsaúOvertime pay.gffffffæ?)ÚidÚsourceÚurlÚtextÚvector)ÚidfÚchunksc                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚWebExportTestc                 C   s0   t tƒd d }|  d|¡ |  |d d¡ d S )Nr   r   r   r   r   )r   ÚPAYLOADÚassertNotInÚassertEqual)ÚselfÚchunk© r   ú,/root/openrights-assistant/tests/test_web.pyÚ)test_vectors_are_not_shipped_to_the_phone   s   z7WebExportTest.test_vectors_are_not_shipped_to_the_phonec                 C   sP   t tƒ}|  | d¡¡ t |tdƒ| ¡  d¡… ¡}|  	|d ddi¡ d S )Nzwindow.OPENRIGHTS_INDEX=ú;r   r   r   )
r   r   Ú
assertTrueÚ
startswithÚjsonÚloadsÚlenÚrstripÚrfindr   )r   ÚscriptÚdatar   r   r   Ú.test_index_is_a_script_not_a_fetched_json_file   s    z<WebExportTest.test_index_is_a_script_not_a_fetched_json_fileN)Ú__name__Ú
__module__Ú__qualname__r   r"   r   r   r   r   r      s    r   Ú__main__)
r   ÚunittestÚopenrights.webr   r   r   ÚTestCaser   r#   Úmainr   r   r   r   Ú<module>   s    þÿ