diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2024-05-17 17:42:11 +0100 |
---|---|---|
committer | Ava Hahn <110854134+avahahn@users.noreply.github.com> | 2024-08-20 11:38:51 -0700 |
commit | cad6aed526b38d52f13266120f9a4381f9a22cad (patch) | |
tree | 8108d85b8c56f01504fdf329de787b56c5b7d0a8 /test/test_wasm_component.py | |
parent | 593564fdd10da2bf4e76587a0482af72a9f1461b (diff) | |
download | unit-cad6aed526b38d52f13266120f9a4381f9a22cad.tar.gz unit-cad6aed526b38d52f13266120f9a4381f9a22cad.tar.bz2 |
Tests: initial "wasm-wasi-component" test
Diffstat (limited to 'test/test_wasm_component.py')
-rw-r--r-- | test/test_wasm_component.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_wasm_component.py b/test/test_wasm_component.py new file mode 100644 index 00000000..6d3bc485 --- /dev/null +++ b/test/test_wasm_component.py @@ -0,0 +1,18 @@ +import pytest +from unit.applications.lang.wasm_component import ApplicationWasmComponent + +prerequisites = { + 'modules': {'wasm-wasi-component': 'any'}, + 'features': {'cargo_component': True}, +} + +client = ApplicationWasmComponent() + + +def test_wasm_component(): + client.load('hello_world') + + req = client.get() + + assert client.get()['status'] == 200 + assert req['body'] == 'Hello' |