mirror of https://github.com/encode/starlette.git
tests: Add skipped coverages for `websockets.py` and `templating.py` using `branch=true` (#2793)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
f57b0832be
commit
5000c9fc9c
|
@ -98,7 +98,7 @@ class Jinja2Templates:
|
||||||
self.context_processors = context_processors or []
|
self.context_processors = context_processors or []
|
||||||
if directory is not None:
|
if directory is not None:
|
||||||
self.env = self._create_env(directory, **env_options)
|
self.env = self._create_env(directory, **env_options)
|
||||||
elif env is not None:
|
elif env is not None: # pragma: no branch
|
||||||
self.env = env
|
self.env = env
|
||||||
|
|
||||||
self._setup_env_defaults(self.env)
|
self._setup_env_defaults(self.env)
|
||||||
|
|
|
@ -103,7 +103,7 @@ class WebSocket(HTTPConnection):
|
||||||
) -> None:
|
) -> None:
|
||||||
headers = headers or []
|
headers = headers or []
|
||||||
|
|
||||||
if self.client_state == WebSocketState.CONNECTING:
|
if self.client_state == WebSocketState.CONNECTING: # pragma: no branch
|
||||||
# If we haven't yet seen the 'connect' message, then wait for it first.
|
# If we haven't yet seen the 'connect' message, then wait for it first.
|
||||||
await self.receive()
|
await self.receive()
|
||||||
await self.send({"type": "websocket.accept", "subprotocol": subprotocol, "headers": headers})
|
await self.send({"type": "websocket.accept", "subprotocol": subprotocol, "headers": headers})
|
||||||
|
|
Loading…
Reference in New Issue