Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 375de82

Browse files
committed
Linting fixups
1 parent 5757306 commit 375de82

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

tests/unit/trace/ext/django/test_db.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@
2121
from django.test.utils import teardown_test_environment
2222

2323
from opencensus.trace import execution_context
24-
from opencensus.trace.tracers.noop_tracer import NoopTracer
2524

2625

2726
class TestOpencensusDatabaseMiddleware(unittest.TestCase):
2827
def setUp(self):
2928
from django.conf import settings as django_settings
3029
from django.test.utils import setup_test_environment
3130

32-
3331
if not django_settings.configured:
3432
django_settings.configure()
3533
setup_test_environment()
@@ -44,9 +42,6 @@ def test_process_request(self):
4442

4543
from opencensus.trace.ext.django import middleware
4644

47-
tracer = middleware._get_current_tracer()
48-
span = tracer.current_span()
49-
5045
sql = "SELECT * FROM users"
5146

5247
MockConnection = namedtuple('Connection', ('vendor'))
@@ -61,7 +56,8 @@ def test_process_request(self):
6156
mock_execute, sql, params=[], many=False,
6257
context={'connection': connection})
6358

64-
mock_sql, mock_params, mock_many, mock_context = mock_execute.call_args[0]
59+
(mock_sql, mock_params, mock_many,
60+
mock_context) = mock_execute.call_args[0]
6561

6662
self.assertEqual(mock_sql, sql)
6763
self.assertEqual(mock_params, [])
@@ -73,5 +69,6 @@ def test_process_request(self):
7369
mock_execute, sql, params=[], many=True,
7470
context={'connection': connection})
7571

76-
mock_sql, mock_params, mock_many, mock_context = mock_execute.call_args[0]
77-
self.assertEqual(mock_many, True)
72+
(mock_sql, mock_params, mock_many,
73+
mock_context) = mock_execute.call_args[0]
74+
self.assertEqual(mock_many, True)

0 commit comments

Comments
 (0)