mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-03-28 17:43:05 +01:00
14 lines
427 B
Python
14 lines
427 B
Python
"""Tests for direct-serve HTTP quality features such as gzip compression."""
|
|
|
|
from fastapi.testclient import TestClient
|
|
|
|
from app.main import app
|
|
|
|
|
|
def test_openapi_json_is_gzipped_when_client_accepts_gzip():
|
|
with TestClient(app) as client:
|
|
response = client.get("/openapi.json", headers={"Accept-Encoding": "gzip"})
|
|
|
|
assert response.status_code == 200
|
|
assert response.headers["content-encoding"] == "gzip"
|