From 72a6177520f2f4f1cea6cb4f59b328844b335414 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Mon, 20 Apr 2020 21:19:45 -0700 Subject: [PATCH] func tests: Allow test_etag_quoter to be run multiple times Change-Id: Ifb1d091e58b9331b027edf981f6af5c015b56936 --- test/functional/test_object.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/functional/test_object.py b/test/functional/test_object.py index ce9730b375..dbc72acef0 100644 --- a/test/functional/test_object.py +++ b/test/functional/test_object.py @@ -1766,11 +1766,15 @@ class TestObject(unittest.TestCase): do_head() post_container('t') do_head(expect_quoted=True) - post_account('t') - post_container('') - do_head(expect_quoted=True) - post_container('f') - do_head() + try: + post_account('t') + post_container('') + do_head(expect_quoted=True) + post_container('f') + do_head() + finally: + # Don't leave a dirty account + post_account('') if __name__ == '__main__':