fixed Link Object Header decoding in complex_object_operations.robot

Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
anastasia prasolova 2022-04-25 13:34:33 +03:00 committed by Anastasia Prasolova
parent 15dd59ddad
commit 95a5a3fda6
2 changed files with 11 additions and 5 deletions

View file

@ -42,8 +42,14 @@ def decode_split_header(data: dict):
'''
try:
data["splitId"] = json_reencode(data["splitId"])
data["lastPart"] = json_reencode(data["lastPart"]["value"])
data["link"] = json_reencode(data["link"]["value"])
data["lastPart"] = (
json_reencode(data["lastPart"]["value"])
if data["lastPart"] else None
)
data["link"] = (
json_reencode(data["link"]["value"])
if data["link"] else None
)
except Exception as exc:
raise ValueError(f"failed to decode JSON output: {exc}") from exc

View file

@ -2,7 +2,7 @@
Variables common.py
Library neofs_verbs.py
Library complex_object_operations.py
Library complex_object_actions.py
*** Keywords ***
@ -14,7 +14,7 @@ Get Object Parts By Link Object
[Arguments] ${WIF} ${CID} ${LARGE_OID}
&{RESPONSE} = Get Link Object ${WIF} ${CID} ${LARGE_OID}
&{LINK_HEADER} = Head Object ${WIF} ${CID} ${RESPONSE.link} is_raw=True
${LINK_OID} = Get Link Object ${WIF} ${CID} ${LARGE_OID}
&{LINK_HEADER} = Head Object ${WIF} ${CID} ${LINK_OID} is_raw=True
[Return] ${LINK_HEADER.header.split.children}