Пример #1
0
 def test_is_ssml_with_ssml(self):
     """is_ssml should be able to detect that a given string is SSML when given SSML"""
     ssml = """
         <speak>
             Here is a number <w role="ivona:VBD">read</w> as a cardinal number:
             <say-as interpret-as="cardinal">12345</say-as>.
             Here is a word spelled out: <say-as interpret-as="spell-out">hello</say-as>.
         </speak>
     """
     response = EchoResponse("Some plain text content")
     assert response.is_ssml(ssml)
Пример #2
0
 def test_is_ssml_with_plain_text(self):
     """is_ssml should be able to detect that a given string is not SSML when given plain text"""
     text = "This is just some text"
     response = EchoResponse("Some plain text content")
     assert not response.is_ssml(text)