mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[4.0.x] Fixed #33160 -- Avoided suppressing query errors in _nodb_cursor() on PostgreSQL.
Backport of 98c8bf1cee from main
			
			
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							0a49276065
						
					
				
				
					commit
					81bb0ae221
				
			| @@ -103,6 +103,11 @@ class Tests(TestCase): | ||||
|                     with connection._nodb_cursor(): | ||||
|                         pass | ||||
|  | ||||
|     def test_nodb_cursor_reraise_exceptions(self): | ||||
|         with self.assertRaisesMessage(DatabaseError, 'exception'): | ||||
|             with connection._nodb_cursor(): | ||||
|                 raise DatabaseError('exception') | ||||
|  | ||||
|     def test_database_name_too_long(self): | ||||
|         from django.db.backends.postgresql.base import DatabaseWrapper | ||||
|         settings = connection.settings_dict.copy() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user