%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/conch/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/conch/test/__pycache__/test_tap.cpython-312.pyc |
� Ϫ�f� � �� � d Z ddlmZmZmZ ddlmZ ddlmZ ddl m Z mZ ddlm Z mZmZ ddlmZ ddlmZ dd lmZ ed � Z ed� ZererddlmZ dd lmZ G d� de� Zy)z! Tests for L{twisted.conch.tap}. � )�Any�Tuple�Union)�StreamServerEndpointService)�error)�FilePasswordDB�ICredentialsChecker)�ISSHPrivateKey�IUsernamePassword�UsernamePassword)�Deferred)� requireModule)�TestCase�cryptographyztwisted.conch.unix)�tap)�OpenSSHFactoryc �r � e Zd ZdZesdZesdZdZdd�Zdd�Z dd �Z dd �Zdd�Zde fd�Zded fd �Zdd�Zy)�MakeServiceTestsz' Tests for L{tap.makeService}. zcan't run without cryptographyz can't run on non-posix computers)s iamusers thisispassword�returnNc � � | j � | _ t | j d� 5 }|j dj | j � � ddd� t j � | _ y# 1 sw Y �#xY w)z/ Create a file with two users. zwb+� :N) �mktemp�filename�open�write�join�usernamePasswordr �Options�options)�self�fs �=/usr/lib/python3/dist-packages/twisted/conch/test/test_tap.py�setUpzMakeServiceTests.setUp( s^ � � ��� �� � �$�-�-�� '� 6�1� �G�G�D�I�I�d�3�3�4�5� 6��{�{�}��� 6� 6�s �+A9�9Bc � � t j � }t j |� }| j |t � | j |j j d� | j |j t � y)z� L{tap.makeService} returns a L{StreamServerEndpointService} instance running on TCP port 22, and the linked protocol factory is an instance of L{OpenSSHFactory}. � N) r r �makeService�assertIsInstancer �assertEqual�endpoint�_port�factoryr )r �config�services r"