mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 17:57:55 +00:00
Fix MultiDict typing with multidict-6.0.0 (#64733)
This commit is contained in:
parent
b587e49300
commit
5d753abd79
@ -44,13 +44,13 @@ class MockRequest:
|
||||
self.method = method
|
||||
self.url = url
|
||||
self.status = status
|
||||
self.headers: CIMultiDict[str] = CIMultiDict(headers or {})
|
||||
self.headers: CIMultiDict[str, str] = CIMultiDict(headers or {})
|
||||
self.query_string = query_string or ""
|
||||
self._content = content
|
||||
self.mock_source = mock_source
|
||||
|
||||
@property
|
||||
def query(self) -> MultiDict[str]:
|
||||
def query(self) -> MultiDict[str, str]:
|
||||
"""Return a dictionary with the query variables."""
|
||||
return MultiDict(parse_qsl(self.query_string, keep_blank_values=True))
|
||||
|
||||
@ -68,7 +68,7 @@ class MockRequest:
|
||||
"""Return the body as JSON."""
|
||||
return json.loads(self._text)
|
||||
|
||||
async def post(self) -> MultiDict[str]:
|
||||
async def post(self) -> MultiDict[str, str]:
|
||||
"""Return POST parameters."""
|
||||
return MultiDict(parse_qsl(self._text, keep_blank_values=True))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user