Skip to content

Commit

Permalink
fix: update deprecated imports from ovos-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 21, 2024
1 parent 3266acf commit 9220234
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion test/backwards_compat/test_ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# from mycroft.configuration import Configuration
from mycroft.skills.intent_service import IntentService
from mycroft.skills.skill_loader import SkillLoader
from ovos_utils.messagebus import FakeBus
from ovos_utils.fakebus import FakeBus

# Patch Configuration in the audioservice module to ensure its patched
from ovos_config.config import Configuration
Expand Down
2 changes: 1 addition & 1 deletion test/end2end/minicroft.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ovos_core.skill_manager import SkillManager
from ovos_plugin_manager.skills import find_skill_plugins
from ovos_utils.log import LOG
from ovos_utils.messagebus import FakeBus
from ovos_utils.fakebus import FakeBus
from ovos_utils.process_utils import ProcessState
from ovos_workshop.skills.fallback import FallbackSkill

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unittest

from ovos_tskill_fakewiki import FakeWikiSkill
from ovos_utils.messagebus import FakeBus, Message
from ovos_utils.fakebus import FakeBus, FakeMessage as Message


class TestDialog(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion test/integrationtests/common_query/test_skill.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import unittest

from ovos_utils.messagebus import FakeBus
from ovos_utils.fakebus import FakeBus
from ovos_tskill_fakewiki import FakeWikiSkill
from ovos_workshop.skills.common_query_skill import CommonQuerySkill

Expand Down
2 changes: 1 addition & 1 deletion test/integrationtests/test_workshop.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from time import sleep
from ovos_workshop.skill_launcher import SkillLoader
from ovos_workshop.skills.ovos import OVOSSkill
from ovos_utils.messagebus import FakeBus, Message
from ovos_utils.fakebus import FakeBus, FakeMessage as Message

# tests taken from ovos_workshop

Expand Down
19 changes: 0 additions & 19 deletions test/unittests/test_skill_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def mock_config():
config = deepcopy(LocalConf(DEFAULT_CONFIG))
config['skills']['priority_skills'] = ['foobar']
config['data_dir'] = str(tempfile.mkdtemp())
config['server']['metrics'] = False
config['enclosure'] = {}
return config

Expand All @@ -71,8 +70,6 @@ def setUp(self):
self.temp_dir = Path(temp_dir)
self.message_bus_mock = MessageBusMock()
self._mock_log()
self._mock_skill_updater()
self._mock_skill_settings_downloader()
self.skill_manager = SkillManager(self.message_bus_mock)
self._mock_skill_loader_instance()

Expand All @@ -84,22 +81,6 @@ def _mock_log(self):
def tearDown(self):
rmtree(str(self.temp_dir))

def _mock_skill_settings_downloader(self):
settings_download_patch = patch(
self.mock_package + 'SkillSettingsDownloader',
spec=True
)
self.addCleanup(settings_download_patch.stop)
self.settings_download_mock = settings_download_patch.start()

def _mock_skill_updater(self):
skill_updater_patch = patch(
self.mock_package + 'SkillUpdater',
spec=True
)
self.addCleanup(skill_updater_patch.stop)
self.skill_updater_mock = skill_updater_patch.start()

def _mock_skill_loader_instance(self):
self.skill_dir = self.temp_dir.joinpath('test_skill')
self.skill_loader_mock = Mock(spec=SkillLoader)
Expand Down
2 changes: 1 addition & 1 deletion test/unittests/xformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ovos_core.transformers import UtteranceTransformersService
from ovos_plugin_manager.templates.transformers import UtteranceTransformer

from ovos_utils.messagebus import FakeBus
from ovos_utils.fakebus import FakeBus


class MockTransformer(UtteranceTransformer):
Expand Down

0 comments on commit 9220234

Please sign in to comment.