wip
This commit is contained in:
22
test_callback_simple.py
Normal file
22
test_callback_simple.py
Normal file
@ -0,0 +1,22 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
def test_callback():
|
||||
try:
|
||||
url = 'http://127.0.0.1:8051/_dash-update-component'
|
||||
data = {
|
||||
"output": "current-balance.children",
|
||||
"inputs": [{"id": "ultra-fast-interval", "property": "n_intervals", "value": 1}],
|
||||
"changedPropIds": ["ultra-fast-interval.n_intervals"],
|
||||
"state": []
|
||||
}
|
||||
|
||||
response = requests.post(url, json=data, timeout=10)
|
||||
print(f"Status: {response.status_code}")
|
||||
print(f"Response: {response.text[:1000]}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_callback()
|
Reference in New Issue
Block a user