mycroft-core/test/unittests/skills
Åke ab242a2c82
Handle multiple intents with the same name (#2921)
* Add check for duplicate adapt intents

There are two cases, duplicated named intent and duplicated anonymous intent.

A named intent will cause a ValueError exception notifying the skill
author that there is a collision.

An anonymous intent will silently derive a new name and use that
instead of the default generated one.

* Add tests for intent collisions

* Make enable/disable intent handle the new exception

The enable/disable intent did not mark an intent as detached, instead it
remained in the list of intents after disabling in the IntentServiceInterface
to be retrieved when the intent should be re-enabled.

This moves detached intents into a list of detached intents to so they
won't cause the double enable exception.

* Add move logic to find if intent is detached

MycroftSkill.enable_intent() will now check if the intent is detached
before trying to re-enable it.

* Lock updates of intents

This should avoid some race conditions that may occur if multiple
threads tries to enable / disable intents
2022-11-23 15:52:56 +09:30
..
empty_dir Separate tests into unittests and integrationtests 2017-08-17 02:05:02 -05:00
intent_file/vocab/en-us Update test cases for the new resource loading 2018-08-27 13:42:46 +02:00
locale/en-us Expand .voc files in MycroftSkill.voc_match() 2019-02-22 18:49:01 +01:00
settings Fix skill settings test (broke in rebase) 2017-08-17 02:05:02 -05:00
test_skill Basic tests for get_response based skill methods 2021-02-14 17:18:20 +01:00
translate Add tests for MycroftSkill translate methods 2019-12-29 14:25:09 +01:00
__init__.py Change to Apache 2.0 license from GPLv3.0 2017-10-04 01:28:44 -05:00
decorator_test_skill.py Change to Apache 2.0 license from GPLv3.0 2017-10-04 01:28:44 -05:00
test_audioservice.py Add test for Audioservice.track_info() 2020-02-05 13:13:17 +01:00
test_common_play_skill.py Move AnyCallable to common location 2021-02-14 14:20:58 +01:00
test_common_query_skill.py Check if GUI is connected rather than maintain list of platforms (#3025) 2021-11-24 14:51:10 +09:30
test_context.py Add tests for context decorators 2020-05-11 06:50:36 +02:00
test_event_container.py Store correct function for once events 2019-09-30 13:31:53 +02:00
test_event_scheduler.py switch deprecated EventEmitter to other classes 2020-08-18 15:58:42 +09:30
test_fallback_skill.py Fix remove_fallback() 2020-05-19 10:51:53 +02:00
test_intent_service.py Match keyword entity terms in Mycroft with Adapt 2021-09-26 19:15:17 +02:00
test_intent_service_interface.py Minor cleanup of test case for keyword registration 2021-09-26 19:15:21 +02:00
test_mycroft_skill.py Handle multiple intents with the same name (#2921) 2022-11-23 15:52:56 +09:30
test_mycroft_skill_get_response.py docstring cleanup 2021-05-11 15:10:32 +09:30
test_settings.py Add test for cancelling the download timer 2020-05-27 22:08:14 +02:00
test_skill_api.py docstring cleanup 2021-05-11 15:10:32 +09:30
test_skill_loader.py remove deprecated Settings class and any code in core that references it. 2020-02-27 08:07:07 +01:00
test_skill_manager.py Fix assigning of queue without existing loader 2021-05-06 10:11:39 +09:30
test_skill_updater.py Use XDG Base directories for settings, cache and runtime data 2021-08-05 10:04:45 +02:00