update model
This commit is contained in:
@@ -147,6 +147,18 @@ class TestSelfCalibrationApi:
|
||||
model = response.read()
|
||||
content_type = response.headers["Content-Type"]
|
||||
content_security_policy = response.headers["Content-Security-Policy"]
|
||||
unversioned_cache_control = response.headers["Cache-Control"]
|
||||
with urllib.request.urlopen(
|
||||
f"{self.base_url}/assets/models/n7_seat.glb?v=e7f50f03",
|
||||
timeout=3,
|
||||
) as response:
|
||||
versioned_model_prefix = response.read(4)
|
||||
versioned_cache_control = response.headers["Cache-Control"]
|
||||
with pytest.raises(urllib.error.HTTPError) as missing_model:
|
||||
urllib.request.urlopen(
|
||||
f"{self.base_url}/assets/models/missing-seat.glb?v=missing",
|
||||
timeout=3,
|
||||
)
|
||||
|
||||
assert 'href="/self-calibration.css?v=calibration-10"' in html
|
||||
assert 'src="/self-calibration.js?v=calibration-6"' in html
|
||||
@@ -173,6 +185,10 @@ class TestSelfCalibrationApi:
|
||||
assert '["self-calibration", "self-repair"].includes(module)' in console_script
|
||||
assert 'setRole("admin", { allowModuleTransition: true })' in console_script
|
||||
assert len(model) == 845_992
|
||||
assert versioned_model_prefix == model[:4]
|
||||
assert content_type.startswith("model/gltf-binary")
|
||||
assert unversioned_cache_control == "no-cache"
|
||||
assert versioned_cache_control == "public, max-age=31536000, immutable"
|
||||
assert missing_model.value.code == 404
|
||||
assert "img-src 'self' data: blob:;" in content_security_policy
|
||||
assert "connect-src 'self' blob:;" in content_security_policy
|
||||
|
||||
Reference in New Issue
Block a user