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.7/test/test_email/__pycache__/torture_test.cpython-37.pyc
B

��g�@s�ddlZddlZddlZddlmZddlmZddlmZddl	Z	ddl	m
Zddlm
Z
dd�Zyed	�Wnek
r�ej�YnXGd
d�de�ZGdd
�d
e�Zdd�Zdd�Zdd�Zedkr�ejdd�dS)�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�8/usr/local/lib/python3.7/test/test_email/torture_test.py�openfilesrzcrispin-torture.txtc@seZdZdd�ZdS)�TortureBasecCs&t|�}zt�|�}Wd|��X|S)N)r�emailZmessage_from_file�close)�selfr�fp�msgrrr�_msgobj#s

zTortureBase._msgobjN)�__name__�
__module__�__qualname__rrrrrr"src@seZdZdd�ZdS)�TestCrispinTorturecCsv|j}|j}|�d�}|��}|t|�t�|t|�d�||jd�||jd�t	�}t
||d�||��d�dS)Nzcrispin-torture.txt��
)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�eqZneqrZpayloadrrrr�test_mondo_message/s
5z%TestCrispinTorture.test_mondo_messageN)rrrr&rrrrr-srcs tjt��fdd�t��D�S)Ncs g|]}|�d�rt�|��qS)ZTest)�
startswith�getattr)�.0�name)�modrr�
<listcomp>usz _testclasses.<locals>.<listcomp>)�sys�modulesr�dirrr)r+r�_testclassesss
r0cCs,t��}xt�D]}|�t�|��qW|S)N)�unittestZ	TestSuiter0ZaddTestZ	makeSuite)�suite�	testclassrrrr2xsr2cCsxt�D]}t|�qWdS)N)r0r)r3rrr�	test_mainsr4�__main__)ZdefaultTest)r-rr1�iorZtest.test_emailrZtest.supportrrrrZemail.iteratorsrr�OSErrorZSkipTestrrr0r2r4r�mainrrrr�<module>	s(F