U
    ¤©jR	  ã                   @   sÀ   d dl Z d dlZd dlmZ G dd„ de jƒZej ddddi fddd	i fdddd
difdddi fdddd
difdddddifdddddifddddddœfdddi fg	¡dd„ ƒZdd„ Z	dS )é    N)ÚUIDGeneratorc                   @   s   e Zd Zdd„ ZdS )Ú	TestToolsc                 C   s˜   t ƒ }| ¡ }| ¡ }d}|  t|ƒ|¡ |  d|¡ | d¡}| ¡ }|  t|ƒ|¡ |  d|¡ | dd¡}| ¡ }|  t|ƒ|¡ |  d|¡ d S )Né,   s   @example.comzExample.ORGs   @Example.ORGz/path/to/contents   -/path/to/content@Example.ORG)r   ÚuidZto_icalÚassertEqualÚlenZassertIn)ÚselfÚgr   ÚtxtÚlength© r   úC/tmp/pip-unpacked-wheel-g40nyxg1/icalendar/tests/test_unit_tools.pyÚtest_tools_UIDGenerator	   s    
z!TestTools.test_tools_UIDGeneratorN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   )ÚsplitÚexpectedÚargsÚkwú@úexample.comr   )r   Ú	host_nameú	test.test)r   ú-z123@example.comÚuniqueZ123zabc@example.comÚabcz1234@test.icalendarZ1234ztest.icalendar)r   r   zabc@test.example.com)ztest.example.comr   c                 C   s&   t j| |Ž}| |¡d |ks"t‚dS )z Issue #345 - Why is tools.UIDGenerator a class (that must be instantiated) instead of a module?

    see https://github.com/collective/icalendar/issues/345
    é   N)r   r   r   ÚAssertionError)r   r   r   r   r   r   r   r   Útest_uid_generator_issue_345    s    0r   c                	   C   s@   t  t¡ t ¡  W 5 Q R X t  t¡ t ¡  W 5 Q R X d S )N)ÚpytestZwarnsÚDeprecationWarningr   r   Z
rnd_stringr   r   r   r   Útest_warningT   s    r"   )
Zunittestr    Zicalendar.toolsr   ZTestCaser   ÚmarkZparametrizer   r"   r   r   r   r   Ú<module>   sL   ü

üüüüßþ+
	