Skip to content

Commit

Permalink
tests...
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 20, 2023
1 parent 1039090 commit bfbbaa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ovos_core/intent_services/converse_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def deactivate_skill(self, skill_id, source_skill=None, message=None):

# keep message.context
message = message or Message("")
message.context["skill_id"] = self.skill_id
# send bus event
self.bus.emit(
message.forward("intent.service.skills.deactivated",
Expand Down Expand Up @@ -100,7 +99,6 @@ def activate_skill(self, skill_id, source_skill=None, message=None):

# keep message.context
message = message or Message("")
message.context["skill_id"] = self.skill_id
message = message.forward("intent.service.skills.activated",
{"skill_id": skill_id})
# send bus event
Expand Down
8 changes: 6 additions & 2 deletions test/unittests/skills/test_mycroft_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@

from adapt.intent import IntentBuilder
from ovos_config import Configuration
from ovos_utils.intents.intent_service_interface import open_intent_envelope

from mycroft.skills.skill_data import (load_regex_from_file, load_regex,
load_vocabulary, read_vocab_file)
from ovos_bus_client.message import Message
from ovos_utils.intents.intent_service_interface import open_intent_envelope
from ovos_workshop.decorators import resting_screen_handler, intent_handler
from ovos_workshop.skills.mycroft_skill import MycroftSkill
from ovos_workshop.skills.ovos import OVOSSkill
from test.util import base_config

Expand Down Expand Up @@ -631,8 +632,9 @@ class _TestSkill(OVOSSkill):
pass


class SimpleSkill1(_TestSkill):
class SimpleSkill1(MycroftSkill):
""" Test skill for normal intent builder syntax """

def initialize(self):
self.handler_run = False
i = IntentBuilder('a').require('Keyword').build()
Expand All @@ -647,6 +649,7 @@ def stop(self):

class SimpleSkill2(_TestSkill):
""" Test skill for intent builder without .build() """

def initialize(self):
i = IntentBuilder('a').require('Keyword')
self.register_intent(i, self.handler)
Expand All @@ -660,6 +663,7 @@ def stop(self):

class SimpleSkill3(_TestSkill):
""" Test skill for invalid Intent for register_intent """

def initialize(self):
self.register_intent('string', self.handler)

Expand Down

0 comments on commit bfbbaa1

Please sign in to comment.