Skip to content

Commit

Permalink
Merge pull request #25 from kytos-ng/fix/revert_reload
Browse files Browse the repository at this point in the history
[Fix] Revert importlib reload
  • Loading branch information
viniarck authored Aug 11, 2022
2 parents 6453738 + f6005d8 commit 00c642c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/unit/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand Down

0 comments on commit 00c642c

Please sign in to comment.