Created
February 6, 2018 22:13
-
-
Save dtmilano/7113c9b28b2ca775d9d0d176ec51ff43 to your computer and use it in GitHub Desktop.
AlexaSkillManagementClientTests test for Crypto skill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AlexaSkillManagementClientTests(AlexaSkillTest): | |
def test_crypto_get_price(self): | |
skill_name = 'CryptoSkill' | |
intent = 'GetPrice' | |
coin = 'Bitcoin' | |
conversation = [ | |
{'slot': None, 'text': 'ask Crypto what is the {} price?'.format(coin)}, | |
] | |
simulation_result = self.conversation_text(skill_name, intent, conversation, verbose=verbose) | |
self.assertRegex( | |
simulation_result.get_output_speech(), | |
re.compile('Current price of {} is \d+(\.?\d+)* euros\.'.format(coin), re.IGNORECASE) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment