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:
Renan Heckert Leal 2024-12-13 22:43:43 +00:00 committed by GitHub
parent f57b0832be
commit 5000c9fc9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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})