MCPcopy Create free account
hub / github.com/aws/aws-cli / test_json_response

Method test_json_response

tests/unit/output/test_json_output.py:79–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 }
78
79 def test_json_response(self):
80 output = self.run_cmd('iam list-users', expected_rc=0)[0]
81 parsed_output = json.loads(output)
82 self.assertIn('Users', parsed_output)
83 self.assertEqual(len(parsed_output['Users']), 2)
84 self.assertEqual(
85 sorted(parsed_output['Users'][0].keys()),
86 ['Arn', 'CreateDate', 'Path', 'UserId', 'UserName'],
87 )
88
89 def test_jmespath_json_response(self):
90 jmespath_query = 'Users[*].UserName'

Callers

nothing calls this directly

Calls 1

run_cmdMethod · 0.45

Tested by

no test coverage detected