File: test_response_header.py

package info (click to toggle)
litestar 2.19.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,500 kB
  • sloc: python: 70,169; makefile: 254; javascript: 105; sh: 60
file content (10 lines) | stat: -rw-r--r-- 326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
import pytest

from litestar.datastructures import ResponseHeader
from litestar.exceptions import ImproperlyConfiguredException


def test_response_headers_validation() -> None:
    ResponseHeader(name="test", documentation_only=True)
    with pytest.raises(ImproperlyConfiguredException):
        ResponseHeader(name="test")