Esempio n. 1
0
 def test_statsd_count_call_the_client_if_configured(self):
     request = mock.MagicMock()
     request.registry.statsd = self.mocked_client
     statsd.statsd_count(request, 'toto')
     self.mocked_client.count.assert_called_with('toto')
Esempio n. 2
0
 def test_statsd_count_call_the_client_if_configured(self):
     request = mock.MagicMock()
     request.registry.statsd = self.mocked_client
     statsd.statsd_count(request, 'toto')
     self.mocked_client.count.assert_called_with('toto')
Esempio n. 3
0
 def test_statsd_count_handle_unconfigured_statsd_client(self):
     request = mock.MagicMock()
     request.registry.statsd = None
     statsd.statsd_count(request, 'toto')  # Doesn't raise
Esempio n. 4
0
 def test_statsd_count_handle_unconfigured_statsd_client(self):
     request = mock.MagicMock()
     request.registry.statsd = None
     statsd.statsd_count(request, 'toto')  # Doesn't raise