- Implemented a new bottom bar feature in `bottom-bar.js` that fetches and displays various notifications and statuses in real-time. - Added functions for handling visibility, state updates, and user interactions within the bottom bar. - Introduced WebSocket connection for real-time updates and fallback polling mechanism. - Created a manual testing script `test_manual.py` to validate API endpoints for the manual module. - Included tests for various paths to ensure expected responses from the server.
24 lines
738 B
Python
24 lines
738 B
Python
import urllib.request
|
|
import json
|
|
import sys
|
|
|
|
URL = "http://127.0.0.1:8000"
|
|
|
|
def test_endpoint(path, expected_status=200):
|
|
try:
|
|
req = urllib.request.Request(URL + path)
|
|
with urllib.request.urlopen(req) as response:
|
|
if response.status == expected_status:
|
|
print(f"✅ {path} returned {response.status}")
|
|
return json.loads(response.read().decode())
|
|
else:
|
|
print(f"❌ {path} returned {response.status}")
|
|
except Exception as e:
|
|
print(f"❌ {path} failed: {e}")
|
|
|
|
print("Running Manual Module Smoke Tests...")
|
|
test_endpoint("/api/v1/manual")
|
|
test_endpoint("/api/v1/manual?limit=1")
|
|
test_endpoint("/api/v1/manual?search=test")
|
|
print("Done!")
|