File: //proc/self/root/lib/python3/dist-packages/twisted/web/test/__pycache__/test_http2.cpython-38.pyc
U
s�@g�� � @ sZ d Z ddlmZmZ ddlZddlmZmZ ddlm Z m
Z
mZmZ ddl
mZ ddlmZ ddlmZmZ dd lmZ dd
lmZ ddlmZ ddlmZmZmZmZmZm Z m!Z! dd
l"m#Z# dZ$zHddl%m&Z& ddl'Z'ddl(Z'ddl)Z'ddl*Z*ddl+Z+ddl,m-Z-m.Z. W n e/k
�r& dZ$Y nX G dd� de0�Z1G dd� de0�Z2d2dd�Z3d3dd�Z4dd� Z5G dd� dej6�Z7e e7�Z8G dd� dej6�Z9e e9�Z:G d d!� d!e9�Z;e e;�Z<G d"d#� d#ej6�Z=e e=�Z>G d$d%� d%e0�Z?e e?�Z@G d&d'� d'e0�ZAG d(d)� d)ejBeA�ZCG d*d+� d+ejBeA�ZDG d,d-� d-ejBeA�ZEG d.d/� d/ejBeA�ZFG d0d1� d1ejBeA�ZGdS )4z
Test HTTP/2 support.
� )�absolute_import�divisionN)�
providedBy�directlyProvides)�defer�reactor�task�error)�failure)� iterbytes)�StringTransport�MemoryReactorClock)�
DummyProducer)�unittest)�http)�DummyHTTPHandler�DummyHTTPHandlerProxy�DelayedHTTPHandler�DelayedHTTPHandlerProxy�DummyPullProducerHandlerProxy�_makeRequestProxyFactory�._IDeprecatedHTTPChannelToRequestInterfaceProxy)�IPv4Address)�H2Connection)�Encoder�DecoderzHTTP/2 support not enabledc @ s| e Zd ZdZdd� Zdd� Zdd� Zg dfd d
�Zddd
�Zddd�Z dd� Z
ddd�Zd dd�Zd!dd�Z
g fdd�ZdS )"�FrameFactoryz�
A class containing lots of helper methods and state to build frames. This
allows test cases to easily build correct HTTP/2 frames to feed to
hyper-h2.
c C s t � | _d S �N�r �encoder��self� r"