Skip to content

Commit 1c67795

Browse files
authored
Test 'Bucket.list_blobs' w/ 'user_project' set. (#4089)
1 parent ee54c43 commit 1c67795

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

storage/tests/system.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,15 @@ def test_list_files(self):
508508
self.assertEqual(sorted(blob.name for blob in all_blobs),
509509
sorted(self.FILENAMES))
510510

511+
@unittest.skipUnless(USER_PROJECT, 'USER_PROJECT not set in environment.')
512+
@RetryErrors(unittest.TestCase.failureException)
513+
def test_list_files_with_user_project(self):
514+
with_user_project = Config.CLIENT.bucket(
515+
self.bucket.name, user_project=USER_PROJECT)
516+
all_blobs = list(with_user_project.list_blobs())
517+
self.assertEqual(sorted(blob.name for blob in all_blobs),
518+
sorted(self.FILENAMES))
519+
511520
@RetryErrors(unittest.TestCase.failureException)
512521
def test_paginate_files(self):
513522
truncation_size = 1

0 commit comments

Comments
 (0)