HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/test_email/__pycache__/torture_test.cpython-310.opt-2.pyc
o

�i�@s�ddlZddlZddlZddlmZddlmZddlmZddl	Z	ddl	m
Zddlm
Z
dd�Zzed	�Wn
eyBej�wGd
d�de�ZGdd
�d
e�Zdd�Zdd�Zdd�Zedkrkejdd�dSdS)�N)�StringIO)�
TestEmailBase)�run_unittest)�__file__)�
_structurecCs6ddlm}m}m}|||t�tjd|��}t|d�S)Nr)�join�dirname�abspathZmoredata�r)Zos.pathrrr	�testfile�os�pardir�open)�filenamerrr	�path�r�9/usr/local/lib/python3.10/test/test_email/torture_test.py�openfiles
r�crispin-torture.txtc@�eZdZdd�ZdS)�TortureBasecCs,t|�}zt�|�}W|��|S|��w�N)r�emailZmessage_from_file�close)�selfr�fp�msgrrr�_msgobj#s
�zTortureBase._msgobjN)�__name__�
__module__�__qualname__rrrrrr"src@r)�TestCrispinTorturecCsv|j}|j}|�d�}|��}|t|�t�|t|�d�||jd�||jd�t	�}t
||d�||��d�dS)Nr��
)ra:multipart/mixed
    text/plain
    message/rfc822
        multipart/alternative
            text/plain
            multipart/mixed
                text/richtext
            application/andrew-inset
    message/rfc822
        audio/basic
    audio/basic
    image/pbm
    message/rfc822
        multipart/mixed
            multipart/mixed
                text/plain
                audio/x-sun
            multipart/mixed
                image/gif
                image/gif
                application/x-be2
                application/atomicmail
            audio/x-sun
    message/rfc822
        multipart/mixed
            text/plain
            image/pgm
            text/plain
    message/rfc822
        multipart/mixed
            text/plain
            image/pbm
    message/rfc822
        application/postscript
    image/gif
    message/rfc822
        multipart/mixed
            audio/basic
            audio/basic
    message/rfc822
        multipart/mixed
            application/postscript
            text/plain
            message/rfc822
                multipart/mixed
                    text/plain
                    multipart/parallel
                        image/gif
                        audio/basic
                    application/atomicmail
                    message/rfc822
                        audio/x-sun
)ZassertEqualZndiffAssertEqualrZget_payload�type�list�lenZpreambleZepiloguerr�getvalue)r�eqZneqr�payloadrrrr�test_mondo_message/s
z%TestCrispinTorture.test_mondo_messageN)rrr r*rrrrr!-sr!cs tjt��fdd�t��D�S)Ncs g|]}|�d�rt�|��qS)ZTest)�
startswith�getattr)�.0�name��modrr�
<listcomp>us z _testclasses.<locals>.<listcomp>)�sys�modulesr�dirrrr/r�_testclassesss
r5cCs(t��}t�D]
}|�t�|��q|Sr)�unittestZ	TestSuiter5ZaddTestZ	makeSuite)�suite�	testclassrrrr7xs
r7cCst�D]}t|�qdSr)r5r)r8rrr�	test_mains

�r9�__main__)ZdefaultTest)r2rr6�iorZtest.test_emailrZtest.supportrrrrZemail.iteratorsrr�OSErrorZSkipTestrr!r5r7r9r�mainrrrr�<module>s.�F�