o
    .jA                     @   s~   d Z ddlZddlmZ ddlZeejZejjjZed Z	ej
dd Zej
dd Zejd	g d
dd Zdd ZdS )zTest the funding.json validity.    N)Pathzfunding.jsonc                   C   s   t jddS )zLoad the funding.json file.zutf-8)encoding)FUNDING_JSON_PATH	read_text r   r   V/home/thesage/.local/lib/python3.10/site-packages/icalendar/tests/test_funding_json.pyfunding_json   s   r   c                 C   s
   t | S )zParse the funding.json file.)jsonloads)r   r   r   r   funding_data   s   
r   key_present)z$schemaversionentityprojectsfundingc                 C   s   || v sJ dS )z/Check that the funding.json file is valid JSON.Nr   )r   r   r   r   r   "test_some_validity_of_funding_json   s   r   c                 C   s.   t j|ddd }t| | |ksJ ddS )z;Check that the funding.json file is consistently formatted.   )indent
z&The file should be properly formatted.N)r	   dumpsprint)r   r   reformattedr   r   r   test_consistent_format(   s   r   )__doc__r	   pathlibr   pytest__file__parentHEREREPOSITORY_ROOTr   fixturer   r   markparametrizer   r   r   r   r   r   <module>   s"    





