@@ -273,7 +273,8 @@ def test_connections_handle_too_small_max_frame_size_properly(self):
273
273
c ._sock = sock
274
274
275
275
# 'Receive' the SETTINGS frame.
276
- c .receive_frame (f )
276
+ with pytest .raises (ConnectionError ):
277
+ c .receive_frame (f )
277
278
278
279
# The value advertised by an endpoint MUST be between 2^14 and
279
280
# 2^24-1 octets. Confirm that the max frame size did not increase.
@@ -283,6 +284,10 @@ def test_connections_handle_too_small_max_frame_size_properly(self):
283
284
# the spec dictates to tear down the connection.
284
285
assert c ._sock == None
285
286
287
+ # Check if GoAway frame was correctly sent to the endpoint
288
+ f = decode_frame (sock .queue [0 ])
289
+ assert isinstance (f , GoAwayFrame )
290
+
286
291
def test_connections_handle_too_big_max_frame_size_properly (self ):
287
292
sock = DummySocket ()
288
293
f = SettingsFrame (0 )
@@ -291,7 +296,8 @@ def test_connections_handle_too_big_max_frame_size_properly(self):
291
296
c ._sock = sock
292
297
293
298
# 'Receive' the SETTINGS frame.
294
- c .receive_frame (f )
299
+ with pytest .raises (ConnectionError ):
300
+ c .receive_frame (f )
295
301
296
302
# The value advertised by an endpoint MUST be between 2^14 and
297
303
# 2^24-1 octets. Confirm that the max frame size did not increase.
@@ -301,6 +307,10 @@ def test_connections_handle_too_big_max_frame_size_properly(self):
301
307
# the spec dictates to tear down the connection.
302
308
assert c ._sock == None
303
309
310
+ # Check if GoAway frame was correctly sent to the endpoint
311
+ f = decode_frame (sock .queue [0 ])
312
+ assert isinstance (f , GoAwayFrame )
313
+
304
314
def test_connections_handle_resizing_header_tables_properly (self ):
305
315
sock = DummySocket ()
306
316
f = SettingsFrame (0 )
0 commit comments