1# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"). You 4# may not use this file except in compliance with the License. A copy of 5# the License is located at 6# 7# http://aws.amazon.com/apache2.0/ 8# 9# or in the "license" file accompanying this file. This file is 10# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11# ANY KIND, either express or implied. See the License for the specific 12# language governing permissions and limitations under the License. 13from tests.functional.docs import BaseDocsFunctionalTest 14 15 16class TestLexDocs(BaseDocsFunctionalTest): 17 TYPE_STRING = '{...}|[...]|123|123.4|\'string\'|True|None' 18 19 def test_jsonheader_docs(self): 20 docs = self.get_docstring_for_method('lex-runtime', 'post_content') 21 self.assert_contains_lines_in_order([ 22 '**Request Syntax**', 23 'sessionAttributes=%s,' % self.TYPE_STRING, 24 ':type sessionAttributes: JSON serializable', 25 '**Response Syntax**', 26 '\'slots\': %s,' % self.TYPE_STRING, 27 '\'sessionAttributes\': %s' % self.TYPE_STRING, 28 '**slots** (JSON serializable)', 29 '**sessionAttributes** (JSON serializable)' 30 ], docs) 31