mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							17d6d4fed1
						
					
				
				
					commit
					f81b936727
				
			@@ -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',
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user