Skip to content

Commit 5c32b2b

Browse files
authored
fix: update deprecated imports from ovos-utils (#611)
1 parent 3266acf commit 5c32b2b

File tree

7 files changed

+6
-25
lines changed

7 files changed

+6
-25
lines changed

test/backwards_compat/test_ocp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# from mycroft.configuration import Configuration
1818
from mycroft.skills.intent_service import IntentService
1919
from mycroft.skills.skill_loader import SkillLoader
20-
from ovos_utils.messagebus import FakeBus
20+
from ovos_utils.fakebus import FakeBus
2121

2222
# Patch Configuration in the audioservice module to ensure its patched
2323
from ovos_config.config import Configuration

test/end2end/minicroft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ovos_core.skill_manager import SkillManager
77
from ovos_plugin_manager.skills import find_skill_plugins
88
from ovos_utils.log import LOG
9-
from ovos_utils.messagebus import FakeBus
9+
from ovos_utils.fakebus import FakeBus
1010
from ovos_utils.process_utils import ProcessState
1111
from ovos_workshop.skills.fallback import FallbackSkill
1212

test/integrationtests/common_query/test_continuous_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import unittest
33

44
from ovos_tskill_fakewiki import FakeWikiSkill
5-
from ovos_utils.messagebus import FakeBus, Message
5+
from ovos_utils.fakebus import FakeBus, FakeMessage as Message
66

77

88
class TestDialog(unittest.TestCase):

test/integrationtests/common_query/test_skill.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import json
22
import unittest
33

4-
from ovos_utils.messagebus import FakeBus
4+
from ovos_utils.fakebus import FakeBus
55
from ovos_tskill_fakewiki import FakeWikiSkill
66
from ovos_workshop.skills.common_query_skill import CommonQuerySkill
77

test/integrationtests/test_workshop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from time import sleep
55
from ovos_workshop.skill_launcher import SkillLoader
66
from ovos_workshop.skills.ovos import OVOSSkill
7-
from ovos_utils.messagebus import FakeBus, Message
7+
from ovos_utils.fakebus import FakeBus, FakeMessage as Message
88

99
# tests taken from ovos_workshop
1010

test/unittests/test_skill_manager.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def mock_config():
5757
config = deepcopy(LocalConf(DEFAULT_CONFIG))
5858
config['skills']['priority_skills'] = ['foobar']
5959
config['data_dir'] = str(tempfile.mkdtemp())
60-
config['server']['metrics'] = False
6160
config['enclosure'] = {}
6261
return config
6362

@@ -71,8 +70,6 @@ def setUp(self):
7170
self.temp_dir = Path(temp_dir)
7271
self.message_bus_mock = MessageBusMock()
7372
self._mock_log()
74-
self._mock_skill_updater()
75-
self._mock_skill_settings_downloader()
7673
self.skill_manager = SkillManager(self.message_bus_mock)
7774
self._mock_skill_loader_instance()
7875

@@ -84,22 +81,6 @@ def _mock_log(self):
8481
def tearDown(self):
8582
rmtree(str(self.temp_dir))
8683

87-
def _mock_skill_settings_downloader(self):
88-
settings_download_patch = patch(
89-
self.mock_package + 'SkillSettingsDownloader',
90-
spec=True
91-
)
92-
self.addCleanup(settings_download_patch.stop)
93-
self.settings_download_mock = settings_download_patch.start()
94-
95-
def _mock_skill_updater(self):
96-
skill_updater_patch = patch(
97-
self.mock_package + 'SkillUpdater',
98-
spec=True
99-
)
100-
self.addCleanup(skill_updater_patch.stop)
101-
self.skill_updater_mock = skill_updater_patch.start()
102-
10384
def _mock_skill_loader_instance(self):
10485
self.skill_dir = self.temp_dir.joinpath('test_skill')
10586
self.skill_loader_mock = Mock(spec=SkillLoader)

test/unittests/xformers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from ovos_core.transformers import UtteranceTransformersService
66
from ovos_plugin_manager.templates.transformers import UtteranceTransformer
77

8-
from ovos_utils.messagebus import FakeBus
8+
from ovos_utils.fakebus import FakeBus
99

1010

1111
class MockTransformer(UtteranceTransformer):

0 commit comments

Comments
 (0)