mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-29 19:03:59 +08:00
db0642ec47
date: 2025-12-18T23:23:16 master commit: 154c2334110373950bac1c36fc6e943cb1208326
21 lines
494 B
Python
21 lines
494 B
Python
import json
|
|
import os
|
|
import requests
|
|
|
|
TEST_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)))
|
|
MANIFEST = os.path.join(TEST_DIR, "../agnos.json")
|
|
|
|
|
|
class TestAgnosUpdater:
|
|
|
|
def test_manifest(self):
|
|
with open(MANIFEST) as f:
|
|
m = json.load(f)
|
|
|
|
for img in m:
|
|
r = requests.head(img['url'], timeout=10)
|
|
r.raise_for_status()
|
|
assert r.headers['Content-Type'] == "application/x-xz"
|
|
if not img['sparse']:
|
|
assert img['hash'] == img['hash_raw']
|