Skip to content

Instantly share code, notes, and snippets.

@dtmilano
Created February 6, 2018 22:13
Show Gist options
  • Save dtmilano/7113c9b28b2ca775d9d0d176ec51ff43 to your computer and use it in GitHub Desktop.
Save dtmilano/7113c9b28b2ca775d9d0d176ec51ff43 to your computer and use it in GitHub Desktop.
AlexaSkillManagementClientTests test for Crypto skill
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