Beispiel #1
0
 def test_creation_of_statsd_client(self):
     settings = {
         'statsd.host': 'example.com',
         'statsd.port': '8125',
         'statsd.prefix': '',
         }
     from cnxlogging import make_statist
     statist = make_statist(settings)
     import statsd
     self.assertTrue(isinstance(statist, statsd.StatsClient))
Beispiel #2
0
 def test_creation_degrades_to_logging(self):
     settings = {}
     from cnxlogging import make_statist
     statist = make_statist(settings)
     from cnxlogging import _StatsLoggingClient
     self.assertTrue(isinstance(statist, _StatsLoggingClient))