Skip to content

Commit 7729c30

Browse files
committed
Python2 compatibility in tests
1 parent 22943e7 commit 7729c30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test_elasticsearch/test_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_all_chunks_sent(self, _process_bulk_chunk):
1818
@mock.patch(
1919
'elasticsearch.helpers._process_bulk_chunk',
2020
# make sure we spend some time in the thread
21-
side_effect=lambda *a: [(True, time.sleep(.001) or threading.get_ident())]
21+
side_effect=lambda *a: [(True, time.sleep(.001) or threading.current_thread().ident)]
2222
)
2323
def test_chunk_sent_from_different_threads(self, _process_bulk_chunk):
2424
actions = ({'x': i} for i in range(100))

0 commit comments

Comments
 (0)