def setUp(self): self.client = statsd.Client('localhost', 1234, 'prefix') self.test_object = TestedClass() with mock.patch.object(self.client, '_client') as mocked_client: self.client.watch_execution_time(self.test_object, prefix='test') self.mocked_client = mocked_client
def setUp(self): self.client = statsd.Client("localhost", 1234, "prefix") self.test_object = TestedClass() with mock.patch.object(self.client, "_client") as mocked_client: self.client.watch_execution_time(self.test_object, prefix="test") self.mocked_client = mocked_client