tests: fix usage of transaction.non_atomic_requests (#6043)

This commit is contained in:
Daniel Hahler 2018-06-21 20:44:58 +02:00 committed by Ryan P Kilby
parent 06526cafe5
commit a44cb67988

View File

@ -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)