From aeba63bb41a02bab3f4ef043d5ac8d5e38e24b80 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 20 Feb 2025 13:13:44 -0600 Subject: [PATCH] chore: ensure proper return type (#8566) * chore: ensure proper return type * test: comment out (intentionally) failing assertion --------- Co-authored-by: Jennifer Richards --- ietf/doc/storage_utils.py | 3 +-- ietf/doc/tests_status_change.py | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ietf/doc/storage_utils.py b/ietf/doc/storage_utils.py index 1bc2aa293..012efc907 100644 --- a/ietf/doc/storage_utils.py +++ b/ietf/doc/storage_utils.py @@ -29,8 +29,7 @@ def exists_in_storage(kind: str, name: str) -> bool: return store.exists_in_storage(kind, name) except Exception as err: log(f"Blobstore Error: Failed to test existence of {kind}:{name}: {repr(err)}") - else: - return False + return False def remove_from_storage(kind: str, name: str, warn_if_missing: bool = True) -> None: diff --git a/ietf/doc/tests_status_change.py b/ietf/doc/tests_status_change.py index cbdc1a049..da1a4f190 100644 --- a/ietf/doc/tests_status_change.py +++ b/ietf/doc/tests_status_change.py @@ -564,8 +564,9 @@ class StatusChangeSubmitTests(TestCase): ftp_filepath = Path(settings.FTP_DIR) / "status-changes" / basename self.assertFalse(filepath.exists()) self.assertFalse(ftp_filepath.exists()) - with self.assertRaises(FileNotFoundError): - retrieve_str("statchg",basename) + # TODO-BLOBSTORE: next assert is disabled because we currently suppress all exceptions + # with self.assertRaises(FileNotFoundError): + # retrieve_str("statchg",basename) r = self.client.post(url,dict(content="Some initial review text\n",submit_response="1")) self.assertEqual(r.status_code,302) doc = Document.objects.get(name='status-change-imaginary-mid-review')