Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
| import pathlib | |
| ROOT=pathlib.Path(__file__).resolve().parents[1] | |
| def test_version(): | |
| assert (ROOT/'VERSION').read_text(encoding='utf-8').strip()=='4.6.20' | |
| def test_refresh_route_registered(): | |
| t=(ROOT/"routes"/"ocean_batch.py").read_text(encoding="utf-8") | |
| assert '/files/{subtask_id}/refresh' in t | |
| assert 'refresh_download_url(job_id,subtask_id)' in t | |
| def test_ocean_batch_records_link_issue_time(): | |
| t=(ROOT/"services"/"ocean_batch.py").read_text(encoding="utf-8") | |
| assert 'download_url_issued_at' in t | |
| assert 'async def refresh_download_url' in t | |
| assert 'for attempt in range(3)' in t | |
| def test_frontend_proactive_refresh_and_retries(): | |
| t=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8") | |
| assert '45*60*1000' in t | |
| assert 'createManagedOceanDownload' in t | |
| assert 'retryNo<=2' in t | |
| assert '正在刷新下载链接' in t | |