| Server IP : 159.223.102.202 / Your IP : 216.73.216.189 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/twisted/names/test/__pycache__/ |
Upload File : |
�
M��e� � �r � d Z ddlZddlmZ ddlmZmZ ddlmZm Z ddl
mZ G d� dej � Z
y) z#
Tests for L{twisted.names.cache}.
� N)�verifyClass)�
interfaces�task)�cache�dns)�unittestc �4 � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z y) �CachingTestsz+
Tests for L{cache.CacheResolver}.
c �T � t t j t j � y)zK
L{cache.CacheResolver} implements L{interfaces.IResolver}
N)r r � IResolverr �
CacheResolver)�selfs �?/usr/lib/python3/dist-packages/twisted/names/test/test_cache.py�test_interfacezCachingTests.test_interface s � � �J�(�(�%�*=�*=�>� c � � t j t j dt j t j
�� t
j � g g g ffi� }|j d� j | j g g g f� S )N� example.com��name�type�cls)
r r
r �Query�MX�IN�time�lookupMailExchange�addCallback�assertEqual)r �cs r �test_lookupzCachingTests.test_lookup sx � ����� � �~�C�F�F����G��I�I�K���R�L�J�
�
�� �#�#�N�3�?�?����r�2�r�l�
�
r c �V � t j dt j t j dt j dd� � gt j dt j t j dt j dd� � gt j dt j t j dt j dd� � gf}t j � }t j dt j t j �� }t j ||j � |fi|�� }|j d� | j ||j � | j |j d� t j � S )z�
Cache entries passed into L{cache.CacheResolver.__init__} get
cancelled just like entries added with cacheResult
r �<