async def test_mutli_msg(self, telegraf_statsd_client: aio_statsd.TelegrafStatsdClient, udp_server): metric = aio_statsd.TelegrafStatsdProtocol() metric.gauge("test2.key", 1) metric.increment("test2.key", 1) telegraf_statsd_client.send_telegraf_statsd(metric) for result in [b"test2.key:1|g", b"test2.key:+1|g"]: assert await udp_server.get() == result
async def test_namespace(self, telegraf_statsd_client: aio_statsd.TelegrafStatsdClient, udp_server): metric = aio_statsd.TelegrafStatsdProtocol(prefix="so1n_test") metric.gauge("test2.key", 1) metric.increment("test2.key", 1) telegraf_statsd_client.send_telegraf_statsd(metric) for result in [b"so1n_test.test2.key:1|g", b"so1n_test.test2.key:+1|g"]: assert await udp_server.get() == result