zerver/tests: Require 100% test coverage of zerver/lib/upload.py.

The last line here is impossible to test.

Fixes #4489.
This commit is contained in:
RobbieClarken 2018-05-14 18:28:17 -04:00 committed by Tim Abbott
parent 17d6d4fed1
commit f81b936727
2 changed files with 1 additions and 2 deletions

View File

@ -59,7 +59,6 @@ not_yet_fully_covered = {
'zerver/lib/i18n.py',
'zerver/lib/notifications.py',
'zerver/lib/send_email.py',
'zerver/lib/upload.py',
# Other lib files that ideally would coverage, but aren't sorted
'zerver/__init__.py',
'zerver/filters.py',

View File

@ -515,7 +515,7 @@ class LocalUploadBackend(ZulipUploadBackend):
if settings.LOCAL_UPLOADS_DIR is not None:
upload_backend = LocalUploadBackend() # type: ZulipUploadBackend
else:
upload_backend = S3UploadBackend()
upload_backend = S3UploadBackend() # nocoverage
def delete_message_image(path_id: str) -> bool:
return upload_backend.delete_message_image(path_id)