diff --git a/search/tests/test_api_timing_events.py b/search/tests/test_api_timing_events.py index 6ac658b1..47e78d6d 100644 --- a/search/tests/test_api_timing_events.py +++ b/search/tests/test_api_timing_events.py @@ -1,15 +1,13 @@ -# pylint: disable=too-few-public-methods -# pylint: disable=too-many-ancestors """ Tests for timing functionality """ import datetime +from unittest.mock import patch, call from django.test import TestCase from django.test.utils import override_settings from search.tests.mock_search_engine import MockSearchEngine from search.utils import Timer from search.api import emit_api_timing_event -from unittest.mock import patch, call @override_settings(SEARCH_ENGINE="search.tests.mock_search_engine.MockSearchEngine") @@ -17,6 +15,7 @@ class TimingEventsTest(TestCase): """ Tests to see if timing events are emitted""" def setUp(self): + super().setUp() MockSearchEngine.destroy() patcher = patch('search.api.track') self.mock_track = patcher.start() @@ -24,11 +23,9 @@ def setUp(self): def tearDown(self): MockSearchEngine.destroy() - return super().tearDown() + super().tearDown() def test_perform_search(self): - # pylint: disable=protected-access - search_term = "testing search" course_id = "mock.course.id"