
    i              
           d Z ddlZddlmZmZ ej                            ddeddfdedd	fd
eddfdeddfg          d             Zd Zd Z	dS )zTest the VALARM compatibility of RFC 9074.

See https://www.rfc-editor.org/rfc/rfc9074.html
and also https://github.com/collective/icalendar/issues/657
    N)	vDDDTypesvText)propclsfilealarm_indexUIDrfc_9074_example_1
RELATED-TOrfc_9074_example_2   ACKNOWLEDGEDrfc_9074_example_3	PROXIMITYrfc_9074_example_proximityc                 d    | |         }|j         |         }||         }t          ||          sJ dS )z"Check the types of the properties.N)subcomponents
isinstance)eventsr   r   r   r   eventalarmvalues           X/root/projects/butler/venv/lib/python3.11/site-packages/icalendar/tests/test_rfc_9074.pytest_calendar_typesr      s?     4LE,E$KEeS!!!!!!!    c                     | j         j        d         }|d         j        t          j        d          k    sJ | j         j        d         }|d         dk    sJ |d         j        d         dk    sJ d	S )
zCheck values of the alarms.r   r   20210302T152024Zr   r   z$8297C37D-BA2D-4476-91AE-C1EAA364F8E1RELTYPESNOOZEN)r   r   dtr   	from_icalparams)r   alarm_1alarm_2s      r   test_snoozer%      s    '5a8G>"%)<=O)P)PPPPP'5a8G< $JJJJJ< '	2h>>>>>>r   c                     | j         j        d         }|d         dk    sJ t          |j                  dk    sJ |j        d         }|d         dk    sJ dS )zCheck the proximity values.r   r   DEPARTr   r	   z123456-abcdef-98765432N)r   r   len)r   r   locations      r   test_proximityr*   &   sm    -;A>E))))u"##q(((("1%HE?6666666r   )
__doc__pytesticalendar.propr   r   markparametrizer   r%   r*    r   r   <module>r1      s      + + + + + + + + *	+Q/	u2A6	$8!<	e91=	 " " "? ? ?7 7 7 7 7r   