QUIC Protocol Implementation 1.0
A Python implementation of the QUIC (Quick UDP Internet Connections) protocol.
Loading...
Searching...
No Matches
test_quic.TestQuicConnection Class Reference
Inheritance diagram for test_quic.TestQuicConnection:
Collaboration diagram for test_quic.TestQuicConnection:

Public Member Functions

 setUp (self)
 
 test_initialization (self)
 
 test_get_stream_new (self)
 
 test_add_stream (self, mock_stream)
 
 test_stream_id_generator (self)
 
 test_add_stream_to_stats_dict (self)
 
 test_get_stream_by_id_existing (self, mock_stream)
 
 test_get_stream_by_id_new (self)
 
 test_remove_stream (self)
 
 test_add_file_to_stream (self, mock_open)
 
 test_add_data_to_stream (self)
 
 test_add_active_stream_id (self)
 
 test_is_stream_id_in_dict (self)
 
 test_set_start_time (self, mock_time)
 
 test_send_packets (self, mock_close, mock_send, mock_create, mock_send_size)
 
 test_send_packet_size (self)
 
 test_create_packet (self, mock_getsizeof)
 
 test_generate_streams_frames (self)
 
 test_get_stream_from_active_streams_empty (self)
 
 test_get_stream_from_active_streams (self, mock_choice)
 
 test_send_packet (self)
 
 test_receive_packets (self, mock_receive)
 
 test_receive_packet_size (self, mock_handle)
 
 test_receive_packet_data (self, mock_handle)
 
 test_increment_received_packets_counter (self)
 
 test_handle_received_packet_size (self)
 

Public Attributes

 connection_id
 
 local_addr
 
 remote_addr
 
 quic_connection
 

Detailed Description

@brief Test cases for the QuicConnection class.

Definition at line 24 of file test_quic.py.

Member Function Documentation

◆ setUp()

test_quic.TestQuicConnection.setUp (   self)

Definition at line 29 of file test_quic.py.

◆ test_add_active_stream_id()

test_quic.TestQuicConnection.test_add_active_stream_id (   self)
Test adding an active stream ID

Definition at line 185 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_add_data_to_stream()

test_quic.TestQuicConnection.test_add_data_to_stream (   self)
Test adding data to a stream

Definition at line 171 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_add_file_to_stream()

test_quic.TestQuicConnection.test_add_file_to_stream (   self,
  mock_open 
)
Test adding a file to a stream

Definition at line 160 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_add_stream()

test_quic.TestQuicConnection.test_add_stream (   self,
  mock_stream 
)
Test adding a stream

Definition at line 67 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_add_stream_to_stats_dict()

test_quic.TestQuicConnection.test_add_stream_to_stats_dict (   self)
Test adding a stream to the stats dictionary

Definition at line 105 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_create_packet()

test_quic.TestQuicConnection.test_create_packet (   self,
  mock_getsizeof 
)
Test creating a packet

Definition at line 260 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_generate_streams_frames()

test_quic.TestQuicConnection.test_generate_streams_frames (   self)
Test generating frames for all active streams

Definition at line 276 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_get_stream_by_id_existing()

test_quic.TestQuicConnection.test_get_stream_by_id_existing (   self,
  mock_stream 
)
Test getting an existing stream by ID

Definition at line 118 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_get_stream_by_id_new()

test_quic.TestQuicConnection.test_get_stream_by_id_new (   self)
Test getting a new stream by ID

Definition at line 127 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_get_stream_from_active_streams()

test_quic.TestQuicConnection.test_get_stream_from_active_streams (   self,
  mock_choice 
)
Test getting a stream from active streams

Definition at line 301 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_get_stream_from_active_streams_empty()

test_quic.TestQuicConnection.test_get_stream_from_active_streams_empty (   self)
Test getting a stream from active streams when empty

Definition at line 291 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_get_stream_new()

test_quic.TestQuicConnection.test_get_stream_new (   self)
Test getting a new stream

Definition at line 49 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_handle_received_packet_size()

test_quic.TestQuicConnection.test_handle_received_packet_size (   self)
Test handling a received packet size

Definition at line 377 of file test_quic.py.

◆ test_increment_received_packets_counter()

test_quic.TestQuicConnection.test_increment_received_packets_counter (   self)
Test incrementing the received packets counter

Definition at line 369 of file test_quic.py.

◆ test_initialization()

test_quic.TestQuicConnection.test_initialization (   self)

◆ test_is_stream_id_in_dict()

test_quic.TestQuicConnection.test_is_stream_id_in_dict (   self)
Test checking if a stream ID is in the dictionary

Definition at line 198 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_receive_packet_data()

test_quic.TestQuicConnection.test_receive_packet_data (   self,
  mock_handle 
)
Test receiving a data packet

Definition at line 355 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_receive_packet_size()

test_quic.TestQuicConnection.test_receive_packet_size (   self,
  mock_handle 
)
Test receiving a packet size

Definition at line 340 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_receive_packets()

test_quic.TestQuicConnection.test_receive_packets (   self,
  mock_receive 
)
Test receiving packets

Definition at line 324 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_remove_stream()

test_quic.TestQuicConnection.test_remove_stream (   self)
Test removing a stream

Definition at line 146 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_send_packet()

test_quic.TestQuicConnection.test_send_packet (   self)
Test sending a packet

Definition at line 312 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection, and test_quic.TestQuicConnection.remote_addr.

◆ test_send_packet_size()

test_quic.TestQuicConnection.test_send_packet_size (   self)
Test sending the packet size

Definition at line 249 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_send_packets()

test_quic.TestQuicConnection.test_send_packets (   self,
  mock_close,
  mock_send,
  mock_create,
  mock_send_size 
)
Test sending packets

Definition at line 226 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_set_start_time()

test_quic.TestQuicConnection.test_set_start_time (   self,
  mock_time 
)
Test setting the start time for all streams

Definition at line 210 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

◆ test_stream_id_generator()

test_quic.TestQuicConnection.test_stream_id_generator (   self)
Test stream ID generation

Definition at line 88 of file test_quic.py.

References test_quic.TestQuicConnection.quic_connection.

Member Data Documentation

◆ connection_id

test_quic.TestQuicConnection.connection_id

Definition at line 31 of file test_quic.py.

Referenced by test_quic.TestQuicConnection.test_initialization().

◆ local_addr

test_quic.TestQuicConnection.local_addr

Definition at line 32 of file test_quic.py.

Referenced by test_quic.TestQuicConnection.test_initialization().

◆ quic_connection

◆ remote_addr

test_quic.TestQuicConnection.remote_addr

The documentation for this class was generated from the following file: