File: test_debug.py

package info (click to toggle)
quart 0.20.0-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 1,888 kB
  • sloc: python: 8,644; makefile: 42; sh: 17; sql: 6
file content (13 lines) | stat: -rw-r--r-- 378 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
from __future__ import annotations

from quart import Quart
from quart.debug import traceback_response


async def test_debug() -> None:
    app = Quart(__name__)
    async with app.test_request_context("/"):
        response = await traceback_response(Exception("Unique error"))

    assert response.status_code == 500
    assert b"Unique error" in (await response.get_data())