mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-07-28 11:07:29 +08:00
Merge 46566848bb into b6db1ac854
This commit is contained in:
@@ -23,7 +23,7 @@ from aiohttp.test_utils import TestClient, TestServer
|
||||
|
||||
# Parse the helper from manager_server.py without importing it, to avoid
|
||||
# pulling in the full ComfyUI/PromptServer stack. Note: we intentionally do
|
||||
# NOT add the `glob/` directory to sys.path — the dir name would shadow
|
||||
# NOT add the `glob/` directory to sys.path, the dir name would shadow
|
||||
# Python's stdlib `glob` module and break pytest collection.
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
@@ -116,6 +116,12 @@ class ContentTypeRejectionTest(unittest.TestCase):
|
||||
r = self._post({"Content-Type": "application/json"})
|
||||
self.assertEqual(r.status, 200)
|
||||
|
||||
def test_none_request_allowed(self):
|
||||
# Internal callers (e.g. legacy-UI batch flows) invoke route handlers
|
||||
# directly with request=None; helper must not raise AttributeError.
|
||||
# Regression test for issue #2843.
|
||||
self.assertIsNone(_reject_simple_form_content_type(None))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main(verbosity=2)
|
||||
|
||||
Reference in New Issue
Block a user