From f6005d8b6d9a5d288bde738535b17c324f8aa5a9 Mon Sep 17 00:00:00 2001 From: Vinicius Arcanjo Date: Thu, 11 Aug 2022 10:46:43 -0300 Subject: [PATCH] Revert importlib reload --- tests/unit/test_main.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/unit/test_main.py b/tests/unit/test_main.py index b1af6f4..e352799 100644 --- a/tests/unit/test_main.py +++ b/tests/unit/test_main.py @@ -2,8 +2,6 @@ import json from unittest import TestCase from unittest.mock import MagicMock, patch -from importlib import reload -import sys from kytos.lib.helpers import ( get_controller_mock, get_test_client, @@ -26,14 +24,6 @@ # pylint: disable=too-many-public-methods, too-many-lines class TestMain(TestCase): """Test the Main class.""" - @classmethod - def setUpClass(cls): - # The decorator run_on_thread is patched, so methods that listen - # for events do not run on threads while tested. - # Decorators have to be patched before the methods that are - # decorated with them are imported. - reload(sys.modules["kytos.core.helpers"]) - patch("kytos.core.helpers.run_on_thread", lambda x: x).start() def setUp(self): """Execute steps before each tests.