Spaces:
Running
Running
| from fastapi.testclient import TestClient | |
| from app.env.fastapi_app import app | |
| def test_remote_env_roundtrip() -> None: | |
| client = TestClient(app) | |
| reset = client.post("/env/reset", json={}) | |
| assert reset.status_code == 200 | |
| legal = client.get("/env/legal_actions") | |
| action = legal.json()[0] | |
| stepped = client.post("/env/step", json=action) | |
| assert stepped.status_code == 200 | |
| assert 0.001 <= stepped.json()["reward"] <= 0.999 | |