Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/asynchronous/test_bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
from test.asynchronous import AsyncIntegrationTest, async_client_context, remove_all_users, unittest
from test.utils import (
async_rs_or_single_client_noauth,
async_single_client,
async_wait_until,
single_client,
)

from bson.binary import Binary, UuidRepresentation
Expand Down Expand Up @@ -817,7 +817,7 @@ async def asyncSetUp(self):
roles=[],
)

async_client_context.create_user(self.db.name, "noremove", "pw", ["noremove"])
await async_client_context.create_user(self.db.name, "noremove", "pw", ["noremove"])

async def asyncTearDown(self):
await self.db.command("dropRole", "noremove")
Expand Down Expand Up @@ -919,7 +919,7 @@ async def test_readonly(self):
username="readonly", password="pw", authSource="pymongo_test"
)
coll = cli.pymongo_test.test
coll.find_one()
await coll.find_one()
with self.assertRaises(OperationFailure):
await coll.bulk_write([InsertOne({"x": 1})])

Expand All @@ -930,7 +930,7 @@ async def test_no_remove(self):
username="noremove", password="pw", authSource="pymongo_test"
)
coll = cli.pymongo_test.test
coll.find_one()
await coll.find_one()
requests = [
InsertOne({"x": 1}),
ReplaceOne({"x": 2}, {"x": 2}, upsert=True),
Expand All @@ -954,7 +954,7 @@ async def _setup_class(cls):
if cls.w is not None and cls.w > 1:
for member in (await async_client_context.hello)["hosts"]:
if member != (await async_client_context.hello)["primary"]:
cls.secondary = single_client(*partition_node(member))
cls.secondary = await async_single_client(*partition_node(member))
break

@classmethod
Expand Down
Loading