diff options
| author | Aymeric Augustin | 2013-10-17 09:22:46 +0200 | 
|---|---|---|
| committer | Aymeric Augustin | 2013-10-17 18:24:58 +0200 | 
| commit | d851a3c8a6bb2b1e8c8cc4f8d6cba0f4a2abe216 (patch) | |
| tree | b32f29a250e0dae9016e500ccaea5c37ba68f4b9 /tests | |
| parent | 06c01648909072aec715535cfa796b58ce287e21 (diff) | |
| download | django-debug-toolbar-d851a3c8a6bb2b1e8c8cc4f8d6cba0f4a2abe216.tar.bz2 | |
Update usage of the threading module.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tests.py | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/tests/tests.py b/tests/tests.py index 67b67bf..32f8d6b 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -1,5 +1,7 @@  from __future__ import unicode_literals +import threading +  import django  from django.conf import settings  from django.contrib.auth.models import User @@ -8,7 +10,6 @@ from django.http import HttpResponse  from django.test import TestCase, RequestFactory  from django.template import Template, Context  from django.utils import six -from django.utils.six.moves import _thread  from django.utils import unittest  from debug_toolbar.middleware import DebugToolbarMiddleware @@ -50,7 +51,7 @@ class BaseTestCase(TestCase):          response = HttpResponse()          toolbar = DebugToolbar(request) -        DebugToolbarMiddleware.debug_toolbars[_thread.get_ident()] = toolbar +        DebugToolbarMiddleware.debug_toolbars[threading.current_thread().ident] = toolbar          self.request = request          self.response = response | 
