Skip to content

Commit

Permalink
Replace checks that rely on non-predictable output.
Browse files Browse the repository at this point in the history
  • Loading branch information
Miro Madecki committed Apr 29, 2021
1 parent be2e95e commit 76c58d6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/shoobx/mocks3/tests/test_s3_boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,9 @@ def test_list_versions(self):
self.assertEqual('1', self.bucket.Object('the-key').version_id)
rsp = self.s3.list_object_versions(Bucket="mybucket", Prefix="the-key")
self.assertEqual(2, len(rsp['Versions']))
self.assertEqual('the-key', rsp['Versions'][0]['Key'])
self.assertEqual('0', rsp['Versions'][0]['VersionId'])
self.assertEqual('the-key', rsp['Versions'][1]['Key'])
self.assertEqual('1', rsp['Versions'][1]['VersionId'])

self.assertEqual(
[('0', 'the-key'), ('1', 'the-key')],
sorted([(v['VersionId'], v['Key']) for v in rsp['Versions']]))
rsp = self.bucket.Object('the-key').get(VersionId='0')
self.assertEqual(b'Version 1', rsp['Body'].read())
rsp = self.bucket.Object('the-key').get(VersionId='1')
Expand Down

0 comments on commit 76c58d6

Please sign in to comment.