Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit dcf46d1

Browse files
committed
Added _recv_cb test
1 parent 190e894 commit dcf46d1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/test_hyper.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,24 @@ def test_that_using_proxy_keeps_http_headers_intact(self):
509509
(':path', '/'),
510510
]
511511

512+
def test_recv_cb_n_times(self):
513+
sock = DummySocket()
514+
sock.can_read = True
515+
516+
c = HTTP20Connection('www.google.com')
517+
c._sock = sock
518+
519+
mutable = {'counter': 0}
520+
521+
def consume_single_frame():
522+
mutable['counter'] += 1
523+
524+
c._consume_single_frame = consume_single_frame
525+
c._recv_cb()
526+
527+
assert mutable['counter'] == 10
528+
529+
512530
class TestServerPush(object):
513531
def setup_method(self, method):
514532
self.frames = []

0 commit comments

Comments
 (0)