Skip to content

Commit

Permalink
Merge branch 'master' into add-credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
dimastbk authored Jun 4, 2024
2 parents 3fac9b9 + 44dde0b commit b9fabcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions tests/unit/client/sync_client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
from pyzeebe import SyncZeebeClient
from pyzeebe.errors import ProcessDefinitionNotFoundError

# Pytest doesn't play well with loop.run_until_complete unless the test has a
# running asyncio loop
pytestmark = pytest.mark.asyncio


@pytest.fixture
def sync_zeebe_client(aio_grpc_channel: grpc.aio.Channel) -> SyncZeebeClient:
def sync_zeebe_client(event_loop, aio_grpc_channel: grpc.aio.Channel) -> SyncZeebeClient:
# NOTE: event_loop: pytest doesn't play well with loop.run_until_complete unless the test has a
# running asyncio loop
client = SyncZeebeClient(aio_grpc_channel)
return client

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/grpc_internals/zeebe_process_adapter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

@pytest.fixture(autouse=True)
def mocked_aiofiles_open():
read_mock = AsyncMock(return_value=bytes())
read_mock = AsyncMock(return_value=b"")

file_mock = AsyncMock()
file_mock.__aenter__.return_value.read = read_mock
Expand Down

0 comments on commit b9fabcf

Please sign in to comment.