Skip to content

Commit

Permalink
test: fix test for simple example
Browse files Browse the repository at this point in the history
  • Loading branch information
alxdrcirilo committed Dec 14, 2023
1 parent e96159e commit 897aa0f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import importlib
from typing import Set
from unittest.mock import Mock, call

Expand Down Expand Up @@ -378,14 +379,16 @@ async def test_e2e_example():
"""
Test that events are produce by the engine and consumed by the streams
"""
from examples.simple import event_store, produce, stream_engine
simple_example = importlib.import_module(
"examples.simple-example.simple_example.app"
)

client = TestStreamClient(stream_engine)
client = TestStreamClient(simple_example.stream_engine)

async with client:
metadata = await produce()
metadata = await simple_example.produce()

assert event_store.total == 5
assert simple_example.event_store.total == 5
assert metadata.partition == 0

# check that all events has been consumed
Expand Down

0 comments on commit 897aa0f

Please sign in to comment.