Skip to content

Commit

Permalink
update docs test to match boto/botocore#2855 (#3636)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonemo authored Mar 23, 2023
1 parent 616ae96 commit e7cc8bf
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions tests/functional/docs/test_dynamodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_document_interface_is_documented(self):
':param Item: **[REQUIRED]**',
'- *(string) --*',
(
'- *(valid DynamoDB type) --* - The value of the '
'- *(valid DynamoDB type) -- *- The value of the '
'attribute. The valid value types are listed in the '
':ref:`DynamoDB Reference Guide<ref_valid_dynamodb_types>`.'
),
Expand All @@ -106,7 +106,7 @@ def test_document_interface_is_documented(self):
'- **Attributes** *(dict) --*',
'- *(string) --*',
(
'- *(valid DynamoDB type) --* - The value of '
'- *(valid DynamoDB type) -- *- The value of '
'the attribute. The valid value types are listed in the '
':ref:`DynamoDB Reference Guide<ref_valid_dynamodb_types>`.'
),
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/docs/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_document_nonservice_resource_actions(self):
' Calls :py:meth:`MyService.Client.sample_operation` to update '
'the attributes of the Sample resource'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample.load()',
' :returns: None',
Expand All @@ -95,7 +95,7 @@ def test_document_nonservice_resource_actions(self):
[
'operate',
'.. py:method:: MyService.Sample.operate(**kwargs)',
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' response = sample.operate(',
" Bar='string'",
Expand All @@ -105,13 +105,13 @@ def test_document_nonservice_resource_actions(self):
' :rtype: dict',
' :returns: ',
' ',
' **Response Syntax** ',
' **Response Syntax**',
' ::',
' {',
" 'Foo': 'string',",
" 'Bar': 'string'",
' }',
' **Response Structure** ',
' **Response Structure**',
' - *(dict) --* ',
' - **Foo** *(string) --* Documents Foo',
' - **Bar** *(string) --* Documents Bar',
Expand All @@ -126,7 +126,7 @@ def test_document_nonservice_resource_actions(self):
' Calls :py:meth:`MyService.Client.sample_operation` to update '
'the attributes of the Sample resource'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample.reload()',
' :returns: None',
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/docs/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_document_collections(self):
' Creates an iterable of all Sample resources in the '
'collection.'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample_iterator = myservice.samples.all()',
' :rtype: list(:py:class:`myservice.Sample`)',
Expand All @@ -54,7 +54,7 @@ def test_document_collections(self):
'if no filters are provided, and extreme caution should be '
'taken when performing actions on all resources'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample_iterator = myservice.samples.filter(',
" Foo='string',",
Expand All @@ -71,7 +71,7 @@ def test_document_collections(self):
' Creates an iterable up to a specified amount of '
'Sample resources in the collection.'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample_iterator = myservice.samples.limit(',
' count=123',
Expand All @@ -84,7 +84,7 @@ def test_document_collections(self):
' :rtype: list(:py:class:`myservice.Sample`)',
' :returns: A list of Sample resources',
' .. py:method:: operate(**kwargs)',
' **Request Syntax** ',
' **Request Syntax**',
' response = myservice.samples.operate(',
" Foo='string',",
" Bar='string'",
Expand All @@ -95,13 +95,13 @@ def test_document_collections(self):
' :param Bar: Documents Bar',
' :rtype: dict',
' :returns: ',
' **Response Syntax** ',
' **Response Syntax**',
' ::',
' {',
" 'Foo': 'string',",
" 'Bar': 'string'",
' }',
' **Response Structure** ',
' **Response Structure**',
' - *(dict) --* ',
' - **Foo** *(string) --* Documents Foo',
' - **Bar** *(string) --* Documents Bar',
Expand All @@ -111,7 +111,7 @@ def test_document_collections(self):
'collection, but limits the number of items returned by '
'each service call by the specified amount.'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
'',
' sample_iterator = myservice.samples.page_size(',
Expand Down
20 changes: 10 additions & 10 deletions tests/unit/docs/test_docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_load_help(self):
' Calls :py:meth:`MyService.Client.sample_operation` to update '
'the attributes of the Sample resource'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample.load()',
' :returns: None',
Expand Down Expand Up @@ -136,7 +136,7 @@ def test_collection_all_method_help(self):
' Creates an iterable of all Sample resources in the '
'collection.'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample_iterator = myservice.samples.all()',
' :rtype: list(:py:class:`myservice.Sample`)',
Expand All @@ -151,7 +151,7 @@ def test_collection_filter_method_help(self):
collection_method_docstring = mock_stdout.getvalue()
self.assert_contains_lines_in_order(
[
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample_iterator = myservice.samples.filter(',
" Foo='string',",
Expand All @@ -173,7 +173,7 @@ def test_collection_limit_method_help(self):
collection_method_docstring = mock_stdout.getvalue()
self.assert_contains_lines_in_order(
[
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample_iterator = myservice.samples.limit(',
' count=123',
Expand All @@ -195,7 +195,7 @@ def test_collection_page_size_method_help(self):
collection_method_docstring = mock_stdout.getvalue()
self.assert_contains_lines_in_order(
[
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample_iterator = myservice.samples.page_size(',
' count=123',
Expand All @@ -222,7 +222,7 @@ def test_collection_chaining_help(self):
' Creates an iterable of all Sample resources in the '
'collection.'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample_iterator = myservice.samples.all()',
' :rtype: list(:py:class:`myservice.Sample`)',
Expand All @@ -237,7 +237,7 @@ def test_batch_action_help(self):
batch_action_docstring = mock_stdout.getvalue()
self.assert_contains_lines_in_order(
[
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' response = myservice.samples.operate(',
" Foo='string',",
Expand All @@ -249,13 +249,13 @@ def test_batch_action_help(self):
' :param Bar: Documents Bar',
' :rtype: dict',
' :returns: ',
' **Response Syntax** ',
' **Response Syntax**',
' ::',
' {',
" 'Foo': 'string',",
" 'Bar': 'string'",
' }',
' **Response Structure** ',
' **Response Structure**',
' - *(dict) --* ',
' - **Foo** *(string) --* Documents Foo',
' - **Bar** *(string) --* Documents Bar',
Expand All @@ -276,7 +276,7 @@ def test_resource_waiter_help(self):
'15 seconds until a successful state is reached. An error '
'is returned after 40 failed checks.'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample.wait_until_complete(',
" Bar='string'",
Expand Down
34 changes: 17 additions & 17 deletions tests/unit/docs/test_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_default(self):
[
'.. py:method:: foo(**kwargs)',
' This describes the foo method.',
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' response = myservice.foo(',
" Foo='string',",
Expand All @@ -54,13 +54,13 @@ def test_default(self):
' :param Bar: Documents Bar',
' :rtype: dict',
' :returns: ',
' **Response Syntax** ',
' **Response Syntax**',
' ::',
' {',
" 'Foo': 'string',",
" 'Bar': 'string'",
' }',
' **Response Structure** ',
' **Response Structure**',
' - *(dict) --* ',
' - **Foo** *(string) --* Documents Foo',
' - **Bar** *(string) --* Documents Bar',
Expand Down Expand Up @@ -97,7 +97,7 @@ def test_returns_resource(self):
[
'.. py:method:: foo(**kwargs)',
' This describes the foo method.',
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample = myservice.foo(',
" Foo='string',",
Expand Down Expand Up @@ -127,7 +127,7 @@ def test_returns_list_of_resource(self):
[
'.. py:method:: foo(**kwargs)',
' This describes the foo method.',
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' samples = myservice.foo(',
" Foo='string',",
Expand Down Expand Up @@ -162,7 +162,7 @@ def test_include_input(self):
[
'.. py:method:: foo(**kwargs)',
' This describes the foo method.',
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' response = myservice.foo(',
" Foo='string',",
Expand All @@ -177,13 +177,13 @@ def test_include_input(self):
' :param Biz: biz docs',
' :rtype: dict',
' :returns: ',
' **Response Syntax** ',
' **Response Syntax**',
' ::',
' {',
" 'Foo': 'string',",
" 'Bar': 'string'",
' }',
' **Response Structure** ',
' **Response Structure**',
' - *(dict) --* ',
' - **Foo** *(string) --* Documents Foo',
' - **Bar** *(string) --* Documents Bar',
Expand All @@ -210,7 +210,7 @@ def test_include_output(self):
[
'.. py:method:: foo(**kwargs)',
' This describes the foo method.',
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' response = myservice.foo(',
" Foo='string',",
Expand All @@ -222,14 +222,14 @@ def test_include_output(self):
' :param Bar: Documents Bar',
' :rtype: dict',
' :returns: ',
' **Response Syntax** ',
' **Response Syntax**',
' ::',
' {',
" 'Foo': 'string',",
" 'Bar': 'string',",
" 'Biz': 'string'",
' }',
' **Response Structure** ',
' **Response Structure**',
' - *(dict) --* ',
' - **Foo** *(string) --* Documents Foo',
' - **Bar** *(string) --* Documents Bar',
Expand All @@ -252,7 +252,7 @@ def test_exclude_input(self):
[
'.. py:method:: foo(**kwargs)',
' This describes the foo method.',
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' response = myservice.foo(',
" Foo='string',",
Expand All @@ -261,13 +261,13 @@ def test_exclude_input(self):
' :param Foo: Documents Foo',
' :rtype: dict',
' :returns: ',
' **Response Syntax** ',
' **Response Syntax**',
' ::',
' {',
" 'Foo': 'string',",
" 'Bar': 'string'",
' }',
' **Response Structure** ',
' **Response Structure**',
' - *(dict) --* ',
' - **Foo** *(string) --* Documents Foo',
' - **Bar** *(string) --* Documents Bar',
Expand All @@ -292,7 +292,7 @@ def test_exclude_output(self):
[
'.. py:method:: foo(**kwargs)',
' This describes the foo method.',
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' response = myservice.foo(',
" Foo='string',",
Expand All @@ -304,12 +304,12 @@ def test_exclude_output(self):
' :param Bar: Documents Bar',
' :rtype: dict',
' :returns: ',
' **Response Syntax** ',
' **Response Syntax**',
' ::',
' {',
" 'Foo': 'string'",
' }',
' **Response Structure** ',
' **Response Structure**',
' - *(dict) --* ',
' - **Foo** *(string) --* Documents Foo',
]
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/docs/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def test_document_service(self):
[
'sample_operation',
'.. py:method:: MyService.Client.sample_operation(**kwargs)',
' **Examples** ',
' **Examples**',
' Sample Description.',
' ::',
' response = client.sample_operation(',
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/docs/test_waiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_document_resource_waiters(self):
'every 15 seconds until a successful state is reached. An '
'error is returned after 40 failed checks.'
),
' **Request Syntax** ',
' **Request Syntax**',
' ::',
' sample.wait_until_complete(',
" Bar='string'",
Expand Down

0 comments on commit e7cc8bf

Please sign in to comment.