
    i                     ^   d dl Z d dlZej                            dddg          d             Zej                            dg d          d             Zej                            d	d
dg          d             Zd Zd Zej                            dddg          d             Z	d Z
d ZdS )    N)fieldexpected_value)PRODIDu+   -//Plönë.org//NONSGML plone.app.event//EN)zX-WR-CALDESCu!   test non ascii: äöü ÄÖÜ €c                 z    |j         }||                                                              d          |k    sJ d S Nzutf-8)calendar_with_unicodeto_icaldecode)r   r   	calendarscals       X/root/projects/butler/venv/lib/python3.11/site-packages/icalendar/tests/test_encoding.py(test_calendar_from_ical_respects_unicoder      sA     
)Cu:&&w//>AAAAAA    )
test_inputr   r   ))event_with_unicode_fieldsSUMMARYu!   Non-ASCII Test: ÄÖÜ äöü €)r   DESCRIPTIONu>   icalendar should be able to handle non-ascii: €äüöÄÜÖ.)r   LOCATIONu
   Tribstrül)%issue_64_event_with_non_ascii_summaryr   u   åäö)!issue_64_event_with_ascii_summaryr   abcdefc                 |    ||          }||                                                              d          |k    sJ d S r   )r	   r
   )r   r   r   eventsevents        r   %test_event_from_ical_respects_unicoder      sC    $ :E<!!((11^CCCCCCr   )r   expected_output)2issue_101_icalendar_chokes_on_umlauts_in_organizeru   acme, ädmin)event_with_unicode_organizeru   Джон Доуc                 D    | |         d         j         d         |k    sJ d S )N	ORGANIZERCN)params)r   r   r   s      r   test_events_parameter_unicodedr#   (   s-     *k*1$7?JJJJJJr   c           	          | j                             d          d                             d          } |t          j        ddddd          d	          }| j         j        rJ ||k    sJ d
S )wIssue #237 - Fail to parse timezone with non-ascii TZID
    see https://github.com/collective/icalendar/issues/237
    VEVENTr   DTSTARTi              zAmerica/Sao_PauloN)4issue_237_fail_to_parse_timezone_with_non_ascii_tzidwalkdecodeddatetimeerrors)r   in_timezonestartexpecteds       r   /test_parses_event_with_non_ascii_tzid_issue_237r4   5   s     JOO 				 
 {8,T1b"bAACVWWHMTTTTHr   c                 ,    | j         d         dk    sJ dS )r%   tzidu   (UTC-03:00) BrasíliaN)issue_237_brazilia_standard)	timezoness    r   2test_parses_timezone_with_non_ascii_tzid_issue_237r9   A   s$     08<SSSSSSSr   timezone_namestandarddaylightc                 d    | j                             |          d         d         d| k    sJ dS )r%   r   TZNAMEu
   Brasília N)r7   r-   )r8   r:   s     r   4test_parses_timezone_with_non_ascii_tzname_issue_273r?   H   sK     	-22=AA!DXN'''	( 	( 	( 	( 	( 	(r   c                     | j                             d          D ]N}t          |j                  dk    s
J d            |j        d         d         }|                    d          sJ OdS )z6
    Test if error messages are encoded properly.
    vevent   zNot the right amount of errors.r   z+Content line could not be parsed into partsN)broken_icalr-   lenr0   
startswith)r   r   errors      r   test_broken_propertyrG   S   s     &++H55 O O5<  A%%%'H%%%Q" MNNNNNNO Or   c                     | j                             d          D ]$}t          |j                  dk    s
J d            %dS )zL
    Test if we support base64 encoded binary data in parameter values.
    rA   r   zGot too many errorsN)
x_locationr-   rD   r0   )r   r   s     r   test_apple_xlocationrJ   ]   sU     %**844 = =5<  A%%%'<%%%%= =r   )r/   pytestmarkparametrizer   r   r#   r4   r9   r?   rG   rJ    r   r   <module>rO      sa     A= B B B
 -   "D D# "D
 % 	O;	 K K K	 	 	T T T :z*BCC  DCO O O= = = = =r   