mirror of
https://github.com/smittix/intercept.git
synced 2026-06-14 00:33:35 -07:00
v2.26.0: fix SSE fanout crash and branded logo FOUC
- Fix SSE fanout thread AttributeError when source queue is None during interpreter shutdown by snapshotting to local variable with null guard - Fix branded "i" logo rendering oversized on first page load (FOUC) by adding inline width/height to SVG elements across 10 templates - Bump version to 2.26.0 in config.py, pyproject.toml, and CHANGELOG.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-4
@@ -1,9 +1,11 @@
|
||||
"""Pytest configuration and fixtures."""
|
||||
|
||||
import contextlib
|
||||
import sqlite3
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from app import app as flask_app
|
||||
from routes import register_blueprints
|
||||
|
||||
@@ -80,9 +82,10 @@ def mock_app_state():
|
||||
|
||||
Provides mock process, queue, and lock objects on the app module.
|
||||
"""
|
||||
import app as app_module
|
||||
import queue
|
||||
|
||||
import app as app_module
|
||||
|
||||
mock_process = MagicMock()
|
||||
mock_process.poll.return_value = None
|
||||
mock_queue = queue.Queue()
|
||||
@@ -107,10 +110,8 @@ def mock_app_state():
|
||||
|
||||
for attr, orig in originals.items():
|
||||
if orig is None:
|
||||
try:
|
||||
with contextlib.suppress(AttributeError):
|
||||
delattr(app_module, attr)
|
||||
except AttributeError:
|
||||
pass
|
||||
else:
|
||||
setattr(app_module, attr, orig)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user