Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsg committed Apr 13, 2022
1 parent 56a66fa commit e453c06
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/unit/test_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@ def test_lifecycle_rules_getter(self):
"condition": {"isLive": False},
}
MULTIPART_RULE = {
"action": {"type": "bortIncompleteMultipartUpload"},
"action": {"type": "AbortIncompleteMultipartUpload"},
"condition": {"age": 42},
}
rules = [DELETE_RULE, SSC_RULE, MULTIPART_RULE]
Expand Down Expand Up @@ -2396,6 +2396,21 @@ def test_add_lifecycle_set_storage_class_rule(self):
self.assertEqual([dict(rule) for rule in bucket.lifecycle_rules], rules)
self.assertTrue("lifecycle" in bucket._changes)

def test_add_lifecycle_abort_incomplete_multipart_upload_rule(self):
NAME = "name"
AIMPU_RULE = {
"action": {"type": "AbortIncompleteMultipartUpload"},
"condition": {"age": 42},
}
rules = [AIMPU_RULE]
bucket = self._make_one(name=NAME)
self.assertEqual(list(bucket.lifecycle_rules), [])

bucket.add_lifecycle_abort_incomplete_multipart_upload_rule(age=42)

self.assertEqual([dict(rule) for rule in bucket.lifecycle_rules], rules)
self.assertTrue("lifecycle" in bucket._changes)

def test_cors_getter(self):
NAME = "name"
CORS_ENTRY = {
Expand Down

0 comments on commit e453c06

Please sign in to comment.