@pytest.mark.skipif('no_real_s3_credentials()')
def test_empty_latest_listing():
 bucket_name = bucket_name_mangle('wal-e-test-empty-listing')
 layout = storage.StorageLayout('s3://{0}/test-prefix'.format(bucket_name))
 with FreshBucket(bucket_name, host='s3.amazonaws.com', calling_format=OrdinaryCallingFormat()) as fb:
  fb.create()
  bl = BackupList(fb.conn, layout, False)
  found = list(bl.find_all('LATEST'))
  assert (len(found) == 0)

@ pytest . mark . skipif ( 'no_real_s3_credentials()' ) def test_empty_latest_listing ( ) : bucket_name = bucket_name_mangle ( 'wal-e-test-empty-listing' ) layout = storage . StorageLayout ( 's3://{0}/test-prefix' . format ( bucket_name ) ) with FreshBucket ( bucket_name , host = 's3.amazonaws.com' , calling_format = OrdinaryCallingFormat ( ) ) as fb : fb . create ( ) bl = BackupList ( fb . conn , layout , False ) found = list ( bl . find_all ( 'LATEST' ) ) assert ( len ( found ) == 0 )
test listing a backup-list latest on an empty prefix .