Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/twisted/positioning/test/__pycache__/ |
Upload File : |
o �bZ � @ s� d Z ddlZddlmZ ddlmZ dZdZG dd� d�ZG d d � d ej �Z G dd� dej�ZG d d� dej �Z G dd� d�ZG dd� dee�ZdS )z" Tests for positioning sentences. � N)� _sentence)�TestCase�someStringValue�someOtherStringValuec @ s e Zd ZdZedd� �ZdS )� DummyProtocolz" A simple, fake protocol. c C s dt tgS )N�type)�sentinelValueOne�sentinelValueTwo� r r �H/usr/lib/python3/dist-packages/twisted/positioning/test/test_sentence.py�getSentenceAttributes s z#DummyProtocol.getSentenceAttributesN)�__name__� __module__�__qualname__�__doc__�staticmethodr r r r r r s r c @ � e Zd ZdZe�� ZdS )� DummySentencez* A sentence for L{DummyProtocol}. N)r r r r r r �ALLOWED_ATTRIBUTESr r r r r � r c @ s e Zd ZdZdeedgiZdS )� MixinProtocolz� A simple, fake protocol that declaratively tells you the sentences it produces using L{base.PositioningSentenceProducerMixin}. N)r r r r r r �_SENTENCE_CONTENTSr r r r r # s ��r c @ r )� MixinSentencez* A sentence for L{MixinProtocol}. N)r r r r r r r r r r r r 2 r r c @ sJ e Zd ZdZdd� Zdd� Zdd� ZdZd Zddd �Z dd� Z dd� ZdS )�SentenceTestsMixinzI Tests for positioning protocols and their respective sentences. c C s: t � }| �t|i�}| �t|t�|� | �t|t�� dS )z� A sentence attribute gets the correct value, and accessing an unset attribute (which is specified as being a valid sentence attribute) gets L{None}. N)�object� sentenceClassr �assertEqual�getattr�assertIsNoner )�self�thisSentinel�sentencer r r �test_attributeAccess? s z'SentenceTestsMixin.test_attributeAccessc C s | � i �}| �tt|d� dS )zM Accessing a nonexistent attribute raises C{AttributeError}. �BOGUSN�r �assertRaises�AttributeErrorr �r r! r r r �"test_raiseOnMissingAttributeAccessJ s z5SentenceTestsMixin.test_raiseOnMissingAttributeAccessc C s"