diff --git a/test_elasticsearch/test_helpers.py b/test_elasticsearch/test_helpers.py index 53996974..4d2fe9bf 100644 --- a/test_elasticsearch/test_helpers.py +++ b/test_elasticsearch/test_helpers.py @@ -18,7 +18,7 @@ class TestParallelBulk(TestCase): @mock.patch( 'elasticsearch.helpers._process_bulk_chunk', # make sure we spend some time in the thread - side_effect=lambda *a: [(True, time.sleep(.001) or threading.get_ident())] + side_effect=lambda *a: [(True, time.sleep(.001) or threading.current_thread().ident)] ) def test_chunk_sent_from_different_threads(self, _process_bulk_chunk): actions = ({'x': i} for i in range(100))