Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Add test for anonymous AdaptIntent
Browse files Browse the repository at this point in the history
forslund committed Nov 24, 2020
1 parent eb78d67 commit 21425da
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/unittests/skills/test_intent_service.py
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
from mycroft.configuration import Configuration
from mycroft.messagebus import Message
from mycroft.skills.intent_service import (ContextManager, IntentService,
_get_message_lang)
_get_message_lang, AdaptIntent)

from test.util import base_config

@@ -327,3 +327,14 @@ def test_get_no_match_after_detach_skill(self):
self.intent_service.handle_get_adapt(msg)
reply = get_last_message(self.intent_service.bus)
self.assertEqual(reply.data['intent'], None)


class TestAdaptIntent(TestCase):
"""Test the AdaptIntent wrapper."""
def test_named_intent(self):
intent = AdaptIntent("CallEaglesIntent")
self.assertEqual(intent.name, "CallEaglesIntent")

def test_unnamed_intent(self):
intent = AdaptIntent()
self.assertEqual(intent.name, "")

0 comments on commit 21425da

Please sign in to comment.