From a44cb679888e59e366ea8e932f80699800589d7f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 21 Jun 2018 20:44:58 +0200 Subject: [PATCH] tests: fix usage of transaction.non_atomic_requests (#6043) --- tests/test_atomic_requests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_atomic_requests.py b/tests/test_atomic_requests.py index 697c549de..bddd480a5 100644 --- a/tests/test_atomic_requests.py +++ b/tests/test_atomic_requests.py @@ -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)