MCPcopy
hub / github.com/benoitc/gunicorn / test_tconn_close

Method test_tconn_close

tests/test_gthread.py:117–125  ·  view source on GitHub ↗

Test connection closing.

(self)

Source from the content-addressed store, hash-verified

115 assert before + 5 <= conn.timeout <= after + 5
116
117 def test_tconn_close(self):
118 """Test connection closing."""
119 cfg = Config()
120 sock = FakeSocket()
121
122 conn = gthread.TConn(cfg, sock, ('127.0.0.1', 12345), ('127.0.0.1', 8000))
123 conn.close()
124
125 assert sock.closed is True
126
127
128class TestPollableMethodQueue:

Callers

nothing calls this directly

Calls 3

closeMethod · 0.95
ConfigClass · 0.90
FakeSocketClass · 0.70

Tested by

no test coverage detected