コード例 #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')
コード例 #2
0
ファイル: test_statsd.py プロジェクト: tfroehlich82/kinto
 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')
コード例 #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
コード例 #4
0
ファイル: test_statsd.py プロジェクト: tfroehlich82/kinto
 def test_statsd_count_handle_unconfigured_statsd_client(self):
     request = mock.MagicMock()
     request.registry.statsd = None
     statsd.statsd_count(request, 'toto')  # Doesn't raise