mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 09:57:55 +03:00 
			
		
		
		
	tests: fix usage of transaction.non_atomic_requests (#6043)
This commit is contained in:
		
							parent
							
								
									06526cafe5
								
							
						
					
					
						commit
						a44cb67988
					
				| 
						 | 
				
			
			@ -6,7 +6,6 @@ from django.conf.urls import url
 | 
			
		|||
from django.db import connection, connections, transaction
 | 
			
		||||
from django.http import Http404
 | 
			
		||||
from django.test import TestCase, TransactionTestCase, override_settings
 | 
			
		||||
from django.utils.decorators import method_decorator
 | 
			
		||||
 | 
			
		||||
from rest_framework import status
 | 
			
		||||
from rest_framework.exceptions import APIException
 | 
			
		||||
| 
						 | 
				
			
			@ -37,7 +36,7 @@ class APIExceptionView(APIView):
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
class NonAtomicAPIExceptionView(APIView):
 | 
			
		||||
    @method_decorator(transaction.non_atomic_requests)
 | 
			
		||||
    @transaction.non_atomic_requests
 | 
			
		||||
    def dispatch(self, *args, **kwargs):
 | 
			
		||||
        return super(NonAtomicAPIExceptionView, self).dispatch(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user