Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Nanguage_executor-http /tests /test_server_conf.py
| from fastapi.testclient import TestClient | |
| from executor.http.server.app import create_app | |
| from executor.http.server.config import ServerSetting | |
| def test_turn_off_routers(): | |
| app = create_app(ServerSetting( | |
| allowed_routers=[] | |
| )) | |
| client = TestClient(app) | |
| resp = client.get("/task/list_all") | |
| assert resp.status_code == 404 | |
| app = create_app(ServerSetting( | |
| allowed_routers=['task'] | |
| )) | |
| client = TestClient(app) | |
| resp = client.get("/task/list_all") | |
| assert resp.status_code == 200 | |
| def test_get_server_setting(): | |
| app = create_app() | |
| client = TestClient(app) | |
| resp = client.get("/server_setting") | |
| assert resp.status_code == 200 | |
| assert 'monitor_mode' in resp.json() | |
| assert 'allowed_routers' in resp.json() | |
Xet Storage Details
- Size:
- 776 Bytes
- Xet hash:
- dc7a0b8c9381fbc352b25fc6299bf9bedda3bfb4b8f5d29622886eebe57e7032
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.