Skip to content

Commit 22bc06f

Browse files
committed
Fixes mcm tests
1 parent 76bb870 commit 22bc06f

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

algoliasearch/http/transporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
AlgoliaUnreachableHostException,
66
RequestException
77
)
8-
from algoliasearch.http.hosts import Host, HostsCollection, CallType
8+
from algoliasearch.http.hosts import Host
99
from algoliasearch.http.request_options import RequestOptions
1010
from algoliasearch.configs import Config
1111
from algoliasearch.http.serializer import (

tests/features/test_search_client.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ def test_copy_move_index(self):
7979

8080
responses.wait()
8181

82-
index_name = self.index.name
83-
8482
self.assertEqual(
8583
self.index2.get_settings()['attributesForFaceting'], ['company']
8684
)
@@ -143,6 +141,13 @@ def test_mcm(self):
143141

144142
mcm.assign_user_id(user_id, clusters[0]['clusterName'])
145143

144+
result = None
145+
while result is None:
146+
try:
147+
result = mcm.get_user_id(user_id)
148+
except RequestException:
149+
pass
150+
146151
users_ids = [user['userID'] for user in
147152
mcm.search_user_ids(user_id)['hits']]
148153

tests/helpers/factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_index_name(test_name):
6565

6666
python_version = platform.python_version().replace('.', '')[:2]
6767

68-
python_version += os.environ.get('TEST_TYPE', '')
68+
python_version += os.environ.get('TEST_TYPE', 'sync')
6969

7070
return 'python{}_{}_{}_{}'.format(
7171
python_version, date, instance, test_name)

tests/helpers/misc_async.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import asyncio
2-
import time
32
import types
43

5-
from algoliasearch.exceptions import RequestException
64
from algoliasearch.iterators import Iterator
75

86

0 commit comments

Comments
 (0)