mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-30 19:43:47 +00:00 
			
		
		
		
	send_email: Enforce in tests that all send_email calls JSON-roundtrip.
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							33f7da23a0
						
					
				
				
					commit
					aa63b40f27
				
			| @@ -358,6 +358,11 @@ def send_email( | ||||
|             ), | ||||
|         ) | ||||
|     else: | ||||
|         if settings.TEST_SUITE: | ||||
|             # In tests, verify that the context object is | ||||
|             # JSON-serializable, as may happen in production using | ||||
|             # EMAIL_ALWAYS_ENQUEUED, above. | ||||
|             context = orjson.loads(orjson.dumps(context)) | ||||
|         send_immediate_email( | ||||
|             template_prefix, | ||||
|             to_user_ids, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user