diff --git a/tests/handlers/tests.py b/tests/handlers/tests.py
index a1fed74..871b65e 100644
--- a/tests/handlers/tests.py
+++ b/tests/handlers/tests.py
@@ -4,7 +4,7 @@ from __future__ import unicode_literals
 
 from django.core.handlers.wsgi import WSGIHandler, WSGIRequest
 from django.core.signals import request_finished, request_started
-from django.db import close_old_connections, connection
+from django.db import close_old_connections, connection, transaction
 from django.test import (
     RequestFactory, TestCase, TransactionTestCase, override_settings,
 )
@@ -121,7 +121,8 @@ class TransactionsPerRequestTests(TransactionTestCase):
         old_atomic_requests = connection.settings_dict['ATOMIC_REQUESTS']
         try:
             connection.settings_dict['ATOMIC_REQUESTS'] = True
-            response = self.client.get('/in_transaction/')
+            with self.assertNumQueries(1):
+                response = self.client.get('/in_transaction/')
         finally:
             connection.settings_dict['ATOMIC_REQUESTS'] = old_atomic_requests
         self.assertContains(response, 'True')
@@ -130,11 +131,25 @@ class TransactionsPerRequestTests(TransactionTestCase):
         old_atomic_requests = connection.settings_dict['ATOMIC_REQUESTS']
         try:
             connection.settings_dict['ATOMIC_REQUESTS'] = True
-            response = self.client.get('/not_in_transaction/')
+            with self.assertNumQueries(0):
+                response = self.client.get('/not_in_transaction/')
         finally:
             connection.settings_dict['ATOMIC_REQUESTS'] = old_atomic_requests
         self.assertContains(response, 'False')
 
+    def test_within_existing_transaction(self):
+        old_atomic_requests = connection.settings_dict['ATOMIC_REQUESTS']
+        try:
+            connection.settings_dict['ATOMIC_REQUESTS'] = True
+            with transaction.atomic():
+                # @atomic() opened a transaction, we should not see an extra
+                # query.
+                with self.assertNumQueries(0):
+                    response = self.client.get('/in_transaction/')
+        finally:
+            connection.settings_dict['ATOMIC_REQUESTS'] = old_atomic_requests
+        self.assertContains(response, 'True')
+
 
 @override_settings(ROOT_URLCONF='handlers.urls')
 class SignalsTests(TestCase):
