U
    j]                     @   sL   d Z ddlmZ ddlmZ ddlmZ ddlmZ dZdd Z	d	d
 Z
dS )zWe would like to be able to get the right timezone names.

See https://github.com/collective/icalendar/issues/336

It appears that the timezone Brazil/DeNoronha is actually America/Noronha.
    )datetime)tz)Event)tzid_from_tzinfo)zAmerica/NoronhaBrazil/DeNoronhac                  C   s   t d} t| tkstdS )zTry to get the name directly.r   N)r   gettzr   valid_namesAssertionErrortzinfo r   T/tmp/pip-unpacked-wheel-g40nyxg1/icalendar/tests/test_issue_336_dateutil_timezone.pytest_timezone_name_directly   s    
r   c               	      sT   t  } tdddddtdd| _|    t  t fdd	t	D sPt
d
S )z@The example has an event in it and we want to have the id in it.i              r   r
   c                 3   s   | ]}| kV  qd S )Nr   ).0nameZicsr   r   	<genexpr>   s     z test_in_event.<locals>.<genexpr>N)r   r   r   r   startZto_icaldecodeprintanyr   r	   )eventr   r   r   test_in_event   s
    r   N)__doc__r   Zdateutilr   Z	icalendarr   Zicalendar.timezoner   r   r   r   r   r   r   r   <module>   s   