0x1949 Team - FAZEMRX - MANAGER
Edit File: test_sip.cpython-310.pyc
o �b�c � @ s� d Z ddlmZmZ ddlmZmZ ddlmZ ddl m Z zddlmZ W n e y1 dZY nw ddlmZ d d �dd� Zd �dd�Zd�dd�Zd�dd�Zd�dd�Zd�dd�Zd�dd�Zd�dd�ZG dd� d�ZG dd� de j�ZG dd� de�ZG dd� de j�ZG dd� de j�ZG dd� de j�ZG d d!� d!e j�Z eej!�G d"d#� d#��Z"eej!�G d$d%� d%��Z#G d&d'� d'e j�Z$G d(d)� d)e j�Z%G d*d+� d+ej&�Z'G d,d-� d-e j�Z(dS ).z( Session Initialization Protocol tests. � )�checkers�portal)�defer�reactor)�sip)�unittest)�AsyncioSelectorReactorN)�implementerz z?INVITE sip:foo SIP/2.0 From: mo To: joe Content-Length: 4 abcd� z z-INVITE sip:foo SIP/2.0 From: mo To: joe 1234zHINVITE sip:foo SIP/2.0 From: mo To: joe Content-Length: 4 1234 lalalalz�INVITE sip:foo SIP/2.0 From: mo To: joe Content-Length: 0 INVITE sip:loop SIP/2.0 From: foo To: bar Content-Length: 4 abcdINVITE sip:loop SIP/2.0 From: foo To: bar Content-Length: 4 1234z4SIP/2.0 200 OK From: foo To:bar Content-Length: 0 z.INVITE sip:foo SIP/2.0 f: mo t: joe l: 4 abcdz=INVITE sip:foo SIP/2.0 Via: SIP/2.0/UDP 10.0.0.1:5060;rport a� SIP/2.0 200 OK Via: SIP/2.0/UDP server10.biloxi.com ;branch=z9hG4bKnashds8;received=192.0.2.3 Via: SIP/2.0/UDP bigbox3.site3.atlanta.com ;branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2 Via: SIP/2.0/UDP pc33.atlanta.com ;branch=z9hG4bK776asdhds ;received=192.0.2.1 To: Bob <sip:bob@biloxi.com>;tag=a6c85cf From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710@pc33.atlanta.com CSeq: 314159 INVITE Contact: <sip:bob@192.0.2.4> Content-Type: application/sdp Content-Length: 0 c @ � e Zd Zdd� ZdS )� TestRealmc G s t jd dd� fS )Nc S s d S �N� r r r �7/usr/lib/python3/dist-packages/twisted/test/test_sip.py�<lambda>� s z)TestRealm.requestAvatar.<locals>.<lambda>)r �IContact)�self�avatarId�mind� interfacesr r r � requestAvatar s zTestRealm.requestAvatarN)�__name__� __module__�__qualname__r r r r r r ~ � r c @ �\ e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� ZdS )�MessageParsingTestsc C s g | _ t�| j j�| _d S r )�lr �MessagesParser�append�parser�r r r r �setUp� s zMessageParsingTests.setUpc C s | j �|� | j �� d S r �r �dataReceived�dataDone)r �messager r r �feedMessage� s zMessageParsingTests.feedMessagec C sN | � |j|� | � |j�� |� | � |j|� | � |j|� | � |jd� dS )z$ Validate Requests. � N)�assertEqual�method�uri�toString�headers�body�finished)r �mr* r+ r- r. r r r �validateMessage� s z#MessageParsingTests.validateMessagec C �H | j }| �t� | �t|�d� | �|d dddgdgdgd�d � d S � Nr( r �INVITE�sip:foo�mo�joe�4��from�tozcontent-length�abcd)r r'