Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 3 additions & 5 deletions packages/templates/plugin/python/tests/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
from hypothesis import given, strategies as st

from polywrap_core import InvokeOptions

from sample import sample_plugin

@given(st.text())
async def test_sample_method(s: str):
plugin = sample_plugin()
wrapper = await plugin.create_wrapper()
res = await wrapper.invoke(InvokeOptions(
wrapper = plugin.create_wrapper()
res = wrapper.invoke(
uri="plugin/sample-plugin",
method="sample_method",
args={"data": s}
), NotImplemented)
)

assert not res.encoded
assert res.result == f"{s} from sample_method"
Loading