| Server IP : 159.223.102.202 / Your IP : 216.73.216.195 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Ȣ � �P � d Z ddlmZ ddlmZ ddlmZ ddlmZm Z m
Z
mZ ddlm
Z
mZ ddlmZ G d� d e� Zd
� Z G d� dej( � Z G d
� dej( � Z G d� d� Z G d� d� Z G d� d� Z G d� d� Zd� Z G d� dej8 � Zy)z)
Test cases for L{twisted.names.server}.
� )�verifyClass)�defer)�IProtocolFactory)�dns�error�resolve�server)�failure�log)�unittestc � � e Zd ZdZd� Zy)�RaisedArgumentszD
An exception containing the arguments raised by L{raiser}.
c � � || _ || _ y �N��args�kwargs��selfr r s �@/usr/lib/python3/dist-packages/twisted/names/test/test_server.py�__init__zRaisedArguments.__init__ s � ��� ���� N)�__name__�
__module__�__qualname__�__doc__r � r r r r s � ��r r c � � t | |� �)z�
Raise a L{RaisedArguments} exception containing the supplied arguments.
Used as a fake when testing the call signatures of methods and functions.
)r r s r �raiserr s � � �$��
'�'r c � � e Zd ZdZd� Zd� Zy)�NoResponseDNSServerFactorya
A L{server.DNSServerFactory} subclass which does not attempt to reply to any
received messages.
Used for testing logged messages in C{messageReceived} without having to
fake or patch the preceding code which attempts to deliver a response
message.
c � � y)a
Deny all queries.
@param message: See L{server.DNSServerFactory.allowQuery}
@param protocol: See L{server.DNSServerFactory.allowQuery}
@param address: See L{server.DNSServerFactory.allowQuery}
@return: L{False}
@rtype: L{bool}
Fr )r �message�protocol�addresss r �
allowQueryz%NoResponseDNSServerFactory.allowQuery. s � � r c � � y)z�
A noop send reply.
@param protocol: See L{server.DNSServerFactory.sendReply}
@param message: See L{server.DNSServerFactory.sendReply}
@param address: See L{server.DNSServerFactory.sendReply}
Nr )r r$ r# r% s r � sendReplyz$NoResponseDNSServerFactory.sendReply; � � r N)r r r r r&