mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Use ternary operator for trivial assignment
This commit is contained in:
parent
2e619806a0
commit
19120422a7
1 changed files with 1 additions and 4 deletions
|
|
@ -13,10 +13,7 @@ from vdirsyncer.http import UsageLimitReached, request
|
||||||
|
|
||||||
async def _create_mock_response(status: int, body: str | dict):
|
async def _create_mock_response(status: int, body: str | dict):
|
||||||
raw_body = body
|
raw_body = body
|
||||||
if isinstance(body, dict):
|
text_body = json.dumps(body) if isinstance(body, dict) else body
|
||||||
text_body = json.dumps(body)
|
|
||||||
else:
|
|
||||||
text_body = body
|
|
||||||
|
|
||||||
mock_response = AsyncMock()
|
mock_response = AsyncMock()
|
||||||
mock_response.status = status
|
mock_response.status = status
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue