[#348] Fixed check of fields in S3 aws/boto3 methods related to policies

Signed-off-by: y.lukoyanova <y.lukoyanova@yadro.com>
This commit is contained in:
Yaroslava Lukoyanova 2025-01-15 16:31:54 +03:00
parent daf186690b
commit 80dd8d0b16
2 changed files with 12 additions and 12 deletions

View file

@ -1227,7 +1227,7 @@ class AwsCliClient(S3ClientWrapper):
output = self.local_shell.exec(cmd).stdout
response = self._to_json(output)
assert response.get("AttachedPolicies"), f"Expected AttachedPolicies in response:\n{response}"
assert "AttachedPolicies" in response.keys(), f"Expected AttachedPolicies in response:\n{response}"
return response
@ -1239,7 +1239,7 @@ class AwsCliClient(S3ClientWrapper):
output = self.local_shell.exec(cmd).stdout
response = self._to_json(output)
assert response.get("AttachedPolicies"), f"Expected AttachedPolicies in response:\n{response}"
assert "AttachedPolicies" in response.keys(), f"Expected AttachedPolicies in response:\n{response}"
return response
@ -1264,7 +1264,7 @@ class AwsCliClient(S3ClientWrapper):
output = self.local_shell.exec(cmd).stdout
response = self._to_json(output)
assert response.get("PolicyNames"), f"Expected PolicyNames in response:\n{response}"
assert "PolicyNames" in response.keys(), f"Expected PolicyNames in response:\n{response}"
return response
@ -1276,7 +1276,7 @@ class AwsCliClient(S3ClientWrapper):
output = self.local_shell.exec(cmd).stdout
response = self._to_json(output)
assert response.get("Groups"), f"Expected Groups in response:\n{response}"
assert "Groups" in response.keys(), f"Expected Groups in response:\n{response}"
return response
@ -1288,7 +1288,7 @@ class AwsCliClient(S3ClientWrapper):
output = self.local_shell.exec(cmd).stdout
response = self._to_json(output)
assert response.get("Groups"), f"Expected Groups in response:\n{response}"
assert "Groups" in response.keys(), f"Expected Groups in response:\n{response}"
return response
@ -1324,7 +1324,7 @@ class AwsCliClient(S3ClientWrapper):
output = self.local_shell.exec(cmd).stdout
response = self._to_json(output)
assert response.get("PolicyNames"), f"Expected PolicyNames in response:\n{response}"
assert "PolicyNames" in response.keys(), f"Expected PolicyNames in response:\n{response}"
return response