Skip to content

Commit

Permalink
test_set_dir_root_folder_named_slash
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Nov 15, 2024
1 parent 56cb39f commit 43da6d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api/python/tests/integration/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,16 @@ def test_s3_set_dir(self):

list_object_versions_mock.assert_called_with('bucket', 'foo/')


def test_set_dir_root_folder_named_slash(self):
with patch('quilt3.packages.list_object_versions') as list_object_versions_mock:
list_object_versions_mock.return_value = ([
dict(Key='/foo/a.txt', VersionId='xyz', IsLatest=True, Size=10),
], [])
pkg = Package()
pkg.set_dir('bar', 's3://bucket//foo') # top-level '/' folder
assert True, "No exception raised for top-level folder named '/'"


def test_set_dir_wrong_update_policy(self):
"""Verify non existing update policy raises value error."""
Expand Down

0 comments on commit 43da6d5

Please sign in to comment.