Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce testing utilities for dazl #182

Open
da-tanabe opened this issue Mar 18, 2021 · 0 comments
Open

Introduce testing utilities for dazl #182

da-tanabe opened this issue Mar 18, 2021 · 0 comments

Comments

@da-tanabe
Copy link
Contributor

dazl.connect_mock may actually be straightforward to implement now with the new dazl v8 API.

func exercise_handler(commands: ExerciseCommand) -> ExerciseResponse: ...

conn = dazl.connect_mock(act_as=..., read_as=..., exercise_fn=exercise_handler)
conn.upload_package(MY_DAR)
conn.submit_create('Some:Stuff', {...}) 

async with conn.query('Some:Stuff') as stream:
    async for ev in stream.creates():
        print(ev.contract_id, ev.payload)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant