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

Function test_prefix

tests/test_statsd.py:124–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122
123
124def test_prefix():
125 c = Config()
126 c.set("statsd_prefix", "test.")
127 logger = Statsd(c)
128 logger.sock = MockSocket(False)
129
130 logger.info("Blah", extra={"mtype": "gauge", "metric": "gunicorn.test", "value": 666})
131 assert logger.sock.msgs[0] == b"test.gunicorn.test:666|g"
132
133
134def test_prefix_no_dot():

Callers

nothing calls this directly

Calls 5

setMethod · 0.95
infoMethod · 0.95
ConfigClass · 0.90
StatsdClass · 0.90
MockSocketClass · 0.70

Tested by

no test coverage detected