Skip to content

Commit 6ea3e24

Browse files
authored
Merge pull request #190 from alexa/shreraju/directive
fix: directive test case bug fix
2 parents 6832bf1 + 4795f08 commit 6ea3e24

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ask-sdk-core/tests/unit/test_response_helper.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from ask_sdk_model.canfulfill import (CanFulfillIntent, CanFulfillIntentValues,
2828
CanFulfillSlot, CanFulfillSlotValues,
2929
CanUnderstandSlotValues)
30+
from ask_sdk_model.interfaces.alexa.presentation.apla.render_document_directive import \
31+
RenderDocumentDirective
3032
from ask_sdk_model.interfaces.display import PlainText, RichText, TextContent
3133
from ask_sdk_model.interfaces.videoapp import (LaunchDirective, Metadata,
3234
VideoItem)
@@ -130,13 +132,14 @@ def test_add_reprompt_directive(self):
130132
)
131133

132134
def test_response_with_reprompt_directive(self):
135+
directive = RenderDocumentDirective()
133136
expected_response = Response(
134137
output_speech=SsmlOutputSpeech(ssml="<speak>Hello World</speak>"),
135-
reprompt=Reprompt(directives=['Alexa.Presentation.APLA.RenderDocument']),
138+
reprompt=Reprompt(directives=[directive]),
136139
should_end_session=False)
137140

138141
response_factory = self.response_factory.set_should_end_session(True).add_directive_to_reprompt(
139-
directive='Alexa.Presentation.APLA.RenderDocument').speak('Hello World')
142+
directive=directive).speak('Hello World')
140143
assert response_factory.response == expected_response, (
141144
"The add_directive_to_reprompt method of ResponseFactory fails to add directive")
142145

0 commit comments

Comments
 (0)