mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 11:41:02 +02:00
Flow stop, add tests and flow list
This commit is contained in:
parent
19a66ec296
commit
d14bb2aeca
6 changed files with 143 additions and 2 deletions
19
tests/test-flow-get-class
Executable file
19
tests/test-flow-get-class
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
|
||||
url = "http://localhost:8088/"
|
||||
|
||||
resp = requests.post(
|
||||
f"{url}/api/v1/flow",
|
||||
json={
|
||||
"operation": "get-class",
|
||||
"class-name": "default",
|
||||
}
|
||||
)
|
||||
|
||||
resp = resp.json()
|
||||
|
||||
print(resp["class-definition"])
|
||||
|
||||
|
||||
22
tests/test-flow-put-class
Executable file
22
tests/test-flow-put-class
Executable file
File diff suppressed because one or more lines are too long
23
tests/test-flow-start-flow
Executable file
23
tests/test-flow-start-flow
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "http://localhost:8088/"
|
||||
|
||||
resp = requests.post(
|
||||
f"{url}/api/v1/flow",
|
||||
json={
|
||||
"operation": "start-flow",
|
||||
"flow-id": "0003",
|
||||
"class-name": "default",
|
||||
}
|
||||
)
|
||||
|
||||
print(resp)
|
||||
print(resp.text)
|
||||
resp = resp.json()
|
||||
|
||||
|
||||
print(resp)
|
||||
|
||||
22
tests/test-flow-stop-flow
Executable file
22
tests/test-flow-stop-flow
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "http://localhost:8088/"
|
||||
|
||||
resp = requests.post(
|
||||
f"{url}/api/v1/flow",
|
||||
json={
|
||||
"operation": "stop-flow",
|
||||
"flow-id": "0003",
|
||||
}
|
||||
)
|
||||
|
||||
print(resp)
|
||||
print(resp.text)
|
||||
resp = resp.json()
|
||||
|
||||
|
||||
print(resp)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue