MCPcopy Index your code
hub / github.com/aws/aws-cli / test_max_items

Method test_max_items

tests/integration/test_cli.py:487–498  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

485 self.assertEqual(len(response_json['Contents']), 1)
486
487 def test_max_items(self):
488 bucket_name = self.create_bucket()
489 self.put_object(bucket_name, 'foo.txt', contents=b'bar')
490 self.put_object(bucket_name, 'foo2.txt', contents=b'bar')
491 self.put_object(bucket_name, 'foo3.txt', contents=b'bar')
492 p = aws(
493 f's3api list-objects --bucket {bucket_name} '
494 '--max-items 1 --output json'
495 )
496 self.assert_no_errors(p)
497 response_json = p.json
498 self.assertEqual(len(response_json['Contents']), 1)
499
500 def test_query(self):
501 bucket_name = self.create_bucket()

Callers

nothing calls this directly

Calls 4

awsFunction · 0.90
create_bucketMethod · 0.45
put_objectMethod · 0.45
assert_no_errorsMethod · 0.45

Tested by

no test coverage detected