Skip to content

Commit 91ed6f1

Browse files
committed
add inputs in run function test
1 parent 77ac520 commit 91ed6f1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

services/api-server/tests/unit/celery/test_functions.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,22 @@ async def test_with_fake_run_function(
144144
headers[X_SIMCORE_PARENT_PROJECT_UUID] = "null"
145145
headers[X_SIMCORE_PARENT_NODE_ID] = "null"
146146

147+
body = {
148+
"input_1": _faker.uuid4(),
149+
"input_2": _faker.pyfloat(min_value=0, max_value=100),
150+
"input_3": _faker.pyint(min_value=0, max_value=100),
151+
"input_4": _faker.boolean(),
152+
"input_5": _faker.sentence(),
153+
"input_6": [
154+
_faker.pyfloat(min_value=0, max_value=100)
155+
for _ in range(_faker.pyint(min_value=5, max_value=100))
156+
],
157+
}
158+
147159
response = await client.post(
148160
f"/{API_VTAG}/functions/{_faker.uuid4()}:run",
149161
auth=auth,
150-
json={},
162+
json=body,
151163
headers=headers,
152164
)
153165

0 commit comments

Comments
 (0)