o
    bf                     @   s>   d Z ddlmZ ddlmZ ddlmZ G dd dejZdS )z(
Tests for L{twisted.protocols.finger}.
    )finger)StringTransport)unittestc                   @   s8   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d ZdS )FingerTestsz%
    Tests for L{finger.Finger}.
    c                 C   s$   t  | _t | _| j| j dS )zA
        Create and connect a L{finger.Finger} instance.
        N)r   	transportr   FingerprotocolmakeConnectionself r   :/usr/lib/python3/dist-packages/twisted/test/test_finger.pysetUp   s   
zFingerTests.setUpc                 C   "   | j d | | j d dS )z
        When L{finger.Finger} receives a CR LF terminated line, it responds
        with the default user status message - that no such user exists.
        s   moshez
   Login: moshez
No such user
Nr   dataReceivedassertEqualr   valuer
   r   r   r   test_simple      zFingerTests.test_simplec                 C   r   )z
        The behavior for a query which begins with C{"/w"} is the same as the
        behavior for one which does not.  The user is reported as not existing.
        s   /w moshez
r   Nr   r
   r   r   r   test_simpleW"   r   zFingerTests.test_simpleWc                 C   r   )z
        When L{finger.Finger} receives a request for a remote user, it responds
        with a message rejecting the request.
        s   moshez@example.com
s!   Finger forwarding service denied
Nr   r
   r   r   r   test_forwarding*   r   zFingerTests.test_forwardingc                 C   r   )z
        When L{finger.Finger} receives a blank line, it responds with a message
        rejecting the request for all online users.
        s   
s   Finger online list denied
Nr   r
   r   r   r   	test_list2   r   zFingerTests.test_listN)	__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r   r      s    r   N)	r   twisted.protocolsr   twisted.test.proto_helpersr   twisted.trialr   TestCaser   r   r   r   r   <module>   s
   