Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/test_fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

import logging
import os
import re
from html import unescape

Expand Down Expand Up @@ -186,6 +187,7 @@ def test_actual_server_fallback():

# The message from when the Thing errored should be displayed
assert str(thing_error) in unescape(html)
# With the traceback
assert 'labthings_fastapi/example_things/__init__.py", line' in unescape(html)
# With the traceback (NB we need os.path.join to get correct slashes on Windows)
fpath = os.path.join("labthings_fastapi", "example_things", "__init__.py")
assert fpath in unescape(html)
assert f'RuntimeError("{thing_error}")' in unescape(html)