def test_get_bucket_versioning_order(self):
    bucket_name = ('version-order-%s' % short_uid())
    self.s3_client.create_bucket(Bucket=bucket_name)
    self.s3_client.put_bucket_versioning(Bucket=bucket_name, VersioningConfiguration={'Status': 'Enabled'})
    self.s3_client.put_object(Bucket=bucket_name, Key='test', Body='body')
    self.s3_client.put_object(Bucket=bucket_name, Key='test', Body='body')
    self.s3_client.put_object(Bucket=bucket_name, Key='test2', Body='body')
    rs = self.s3_client.list_object_versions(Bucket=bucket_name)
    self.assertEqual(rs['ResponseMetadata']['HTTPStatusCode'], 200)
    self.assertEqual(rs['Name'], bucket_name)
    self.assertEqual(rs['Versions'][0]['IsLatest'], True)
    self.assertEqual(rs['Versions'][2]['IsLatest'], True)
def test_get_bucket_versioning_order(self):
    bucket_name = ('version-order-%s' % short_uid())
    self.s3_client.create_bucket(Bucket=bucket_name)
    self.s3_client.put_bucket_versioning(Bucket=bucket_name, VersioningConfiguration={'Status': 'Enabled'})
    self.s3_client.put_object(Bucket=bucket_name, Key='test', Body='body')
    self.s3_client.put_object(Bucket=bucket_name, Key='test', Body='body')
    self.s3_client.put_object(Bucket=bucket_name, Key='test2', Body='body')
    rs = self.s3_client.list_object_versions(Bucket=bucket_name)
    self.assertEqual(rs['ResponseMetadata']['HTTPStatusCode'], 200)
    self.assertEqual(rs['Name'], bucket_name)
    self.assertEqual(rs['Versions'][0]['IsLatest'], True)
    self.assertEqual(rs['Versions'][2]['IsLatest'], True)