14
0
Files
python-uvicorn/fix-websocket-tests.patch
Daniel Garcia 004b764311 - Add fix-websocket-tests.patch gh#encode/uvicorn#1929
- Update to version 0.22.0:
  * Version 0.22.0 (#1957)
  * Remove unused events (#1956)
  * remove a few mypy excludes (#1954)
  * Add `--timeout-graceful-shutdown` parameter (#1950)
  * Fix typo in setup.cfg (#1953)
  * Update `scripts/check` (#1952)
  * Add `WatchFilesReload` pause method (#1930)
  * Create PULL_REQUEST_TEMPLATE.md (#1946)
  * Handle `SIGBREAK` for Windows (#1909)
  * Fix shutdown event on Windows in reloader (#1584)
  * Handle missing trustme/cryptography gracefully in the test suite (#1940)
  * Add type hints to test_auto_detection.py (#1937)
  * Fix watchgod deprecation warning (#1938)
  * Upgrade and fix Black (#1926)
  * Use ruff instead of flake8, autoflake and isort (#1925)
  * Upgrade MyPy and fix issues (#1931)
  * Pin websockets to <11.0 (#1928)
  * Bump coverage from 7.1.0 to 7.2.2 (#1920)
  * Fix instructions so they work in zsh as well as Bash (#1915)
  * [`Docs`] : Hypercorn supports HTTP/3 (#1913)
  * Version 0.21.1 (#1904)
  * Reset lifespan state on each request (#1903)
  * Version 0.21.0 (#1892)
  * Improve discoverability when `--port=0` is used (#1890)
  * Fix mypy on test_websockets (#1889)
  * Add type annotation on `test_websockets.py` (#1880)
  * Introduce lifespan state (#1818)
  * Bump build from 0.9.0 to 0.10.0 (#1882)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-uvicorn?expand=0&rev=21
2023-05-12 08:39:20 +00:00

14 lines
590 B
Diff

Index: uvicorn-0.22.0/tests/protocols/test_websocket.py
===================================================================
--- uvicorn-0.22.0.orig/tests/protocols/test_websocket.py
+++ uvicorn-0.22.0/tests/protocols/test_websocket.py
@@ -584,7 +584,7 @@ async def test_asgi_return_value(
async with run_server(config):
with pytest.raises(websockets.exceptions.ConnectionClosed) as exc_info:
await connect(f"ws://127.0.0.1:{unused_tcp_port}")
- assert exc_info.value.code == 1006
+ assert exc_info.value.code in {1000, 1006}
@pytest.mark.anyio