File: //usr/lib/python3/dist-packages/twisted/runner/test/__pycache__/test_inetdconf.cpython-38.pyc
U
W[� � @ s2 d Z ddlmZ ddlmZ G dd� dej�ZdS )z,
Tests for implementations of L{inetdconf}.
� )� inetdconf)�unittestc @ s0 e Zd ZdZdZdZdd� Zdd� Zdd� ZdS ) �ServicesConfTestsz-
Tests for L{inetdconf.ServicesConf}
Nc C s\ | � � | _t| jd��}|�d� W 5 Q R X | � � | _t| jd��}|�d� W 5 Q R X d S )N�wz�
# This is a comment
http 80/tcp www www-http # WorldWideWeb HTTP
http 80/udp www www-http
http 80/sctp
z]
https 443/tcp # http protocol over TLS/SSL
)Zmktemp�servicesFilename1�open�write�servicesFilename2)�self�f� r �D/usr/lib/python3/dist-packages/twisted/runner/test/test_inetdconf.py�setUp s
zServicesConfTests.setUpc C s: t �� }| j|_|�� | �|jdddddddd�� dS )z<
Services are parsed from default filename.
�P ))�http�tcp)r �udp)r Zsctp)�wwwr )r r )�www-httpr )r r N)r �ServicesConfr ZdefaultFilename� parseFile�assertEqual�services)r
�confr r r
�test_parseDefaultFilename$ s �z+ServicesConfTests.test_parseDefaultFilenamec C s>