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

Method test_tconn_init

tests/test_gthread.py:63–78  ·  view source on GitHub ↗

Test TConn initialization.

(self)

Source from the content-addressed store, hash-verified

61 """Tests for TConn connection wrapper."""
62
63 def test_tconn_init(self):
64 """Test TConn initialization."""
65 cfg = Config()
66 sock = FakeSocket()
67 client = ('127.0.0.1', 12345)
68 server = ('127.0.0.1', 8000)
69
70 conn = gthread.TConn(cfg, sock, client, server)
71
72 assert conn.cfg is cfg
73 assert conn.sock is sock
74 assert conn.client == client
75 assert conn.server == server
76 assert conn.timeout is None
77 assert conn.parser is None
78 assert conn.initialized is False
79
80 def test_tconn_init_sets_blocking_false(self):
81 """Test that TConn sets socket to non-blocking initially."""

Callers

nothing calls this directly

Calls 2

ConfigClass · 0.90
FakeSocketClass · 0.70

Tested by

no test coverage detected