Current File : //usr/lib/python3/dist-packages/twisted/mail/test/__pycache__/test_options.cpython-312.pyc |
�
Ϫ�f � � � d Z ddlmZmZ ddlmZ ddlmZmZ ddl m
Z
ddlmZ G d� de� Z
G d � d
� Z G d� de� Zy
)z
Tests for L{twisted.mail.tap}.
� )�defer� endpoints)� protocols)�Options�makeService)�
UsageError)�TestCasec �R � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zy
)�OptionsTestszK
Tests for the command line option parser used for I{twistd mail}.
c � � | j � | _ t | j d� 5 }|j d� d d d � y # 1 sw Y y xY w)N�wzsomeuser: differentuser
)�mktemp�
aliasFilename�open�write)�self� aliasFiles �@/usr/lib/python3/dist-packages/twisted/mail/test/test_options.py�setUpzOptionsTests.setUp sD � �!�[�[�]���
�$�$�$�c�
*� :�i��O�O�8�9� :� :� :�s �A�Ac �n � | j t t � j d| j g� y)zi
Test that adding an aliases(5) file before adding a domain raises a
UsageError.
� --aliasesN)�assertRaisesr r �parseOptionsr �r s r �testAliasesWithoutDomainz%OptionsTests.testAliasesWithoutDomain s, � �
����� �.�.��d�>P�>P�0Q�
� c �R � t � j ddd| j g� y)z�
Test that adding an aliases(5) file to an IAliasableDomain at least
doesn't raise an unhandled exception.
z--maildirdbmdomainzexample.com=example.comr N)r r r r s r �testAliaseszOptionsTests.testAliases"