diff --git a/src/plone/restapi/tests/test_documentation.py b/src/plone/restapi/tests/test_documentation.py index c13016bb1f..d0bf9f1018 100644 --- a/src/plone/restapi/tests/test_documentation.py +++ b/src/plone/restapi/tests/test_documentation.py @@ -118,7 +118,9 @@ def pretty_json(data): def save_request_and_response_for_docs( name, response, response_text_override="", request_text_override="" ): - save_request_for_docs(name, response, request_text_override=request_text_override) + save_request_for_docs( + name, response, request_text_override=request_text_override + ) filename = "{}/{}".format(base_path, "%s.resp" % name) with open(filename, "w", **open_kw) as resp: status = response.status_code @@ -169,7 +171,10 @@ def save_request_for_docs(name, response, request_text_override=""): req.write("\n") # Pretty print JSON request body - if content_type == "application/json" and not request_text_override: + if ( + content_type == "application/json" + and not request_text_override + ): json_body = json.loads(response.request.body) body = pretty_json(json_body) # Make sure Content-Length gets updated, just in case we @@ -205,7 +210,8 @@ def setUp(self): self.browser = Browser(self.app) self.browser.handleErrors = False self.browser.addHeader( - "Authorization", "Basic %s:%s" % (SITE_OWNER_NAME, SITE_OWNER_PASSWORD) + "Authorization", + "Basic %s:%s" % (SITE_OWNER_NAME, SITE_OWNER_PASSWORD), ) setRoles(self.portal, TEST_USER_ID, ["Manager"]) @@ -263,8 +269,12 @@ def create_folder(self): folder = self.portal["folder"] folder.title = "My Folder" folder.description = u"This is a folder with two documents" - folder.invokeFactory("Document", id="doc1", title="A document within a folder") - folder.invokeFactory("Document", id="doc2", title="A document within a folder") + folder.invokeFactory( + "Document", id="doc1", title="A document within a folder" + ) + folder.invokeFactory( + "Document", id="doc2", title="A document within a folder" + ) return folder def test_documentation_content_crud(self): @@ -272,7 +282,8 @@ def test_documentation_content_crud(self): transaction.commit() response = self.api_session.post( - folder.absolute_url(), json={"@type": "Document", "title": "My Document"} + folder.absolute_url(), + json={"@type": "Document", "title": "My Document"}, ) save_request_and_response_for_docs("content_post", response) @@ -282,7 +293,8 @@ def test_documentation_content_crud(self): save_request_and_response_for_docs("content_get", response) response = self.api_session.get( - folder.absolute_url() + "?metadata_fields=UID&metadata_fields=Creator" + folder.absolute_url() + + "?metadata_fields=UID&metadata_fields=Creator" ) save_request_and_response_for_docs("content_get_folder", response) @@ -296,7 +308,9 @@ def test_documentation_content_crud(self): headers={"Prefer": "return=representation"}, json={"title": "My New Document Title"}, ) - save_request_and_response_for_docs("content_patch_representation", response) + save_request_and_response_for_docs( + "content_patch_representation", response + ) transaction.commit() response = self.api_session.delete(document.absolute_url()) @@ -323,7 +337,9 @@ def test_documentation_news_item(self): transaction.commit() with patch.object(storage, "uuid4", return_value="uuid1"): - response = self.api_session.get(self.portal.newsitem.absolute_url()) + response = self.api_session.get( + self.portal.newsitem.absolute_url() + ) save_request_and_response_for_docs("newsitem", response) def test_documentation_event(self): @@ -383,7 +399,9 @@ def test_documentation_folder(self): def test_documentation_collection(self): self.portal.invokeFactory("Collection", id="collection") self.portal.collection.title = "My Collection" - self.portal.collection.description = u"This is a collection with two documents" + self.portal.collection.description = ( + u"This is a collection with two documents" + ) self.portal.collection.query = [ { "i": "portal_type", @@ -400,7 +418,9 @@ def test_documentation_collection(self): def test_documentation_collection_fullobjects(self): self.portal.invokeFactory("Collection", id="collection") self.portal.collection.title = "My Collection" - self.portal.collection.description = u"This is a collection with two documents" + self.portal.collection.description = ( + u"This is a collection with two documents" + ) self.portal.collection.query = [ { "i": "portal_type", @@ -431,17 +451,27 @@ def test_documentation_search(self): def test_documentation_search_options(self): self.portal.invokeFactory("Folder", id="folder1", title="Folder 1") - self.portal.folder1.invokeFactory("Folder", id="folder2", title="Folder 2") + self.portal.folder1.invokeFactory( + "Folder", id="folder2", title="Folder 2" + ) transaction.commit() - query = {"sort_on": "path", "path.query": "/plone/folder1", "path.depth": "1"} + query = { + "sort_on": "path", + "path.query": "/plone/folder1", + "path.depth": "1", + } response = self.api_session.get("/@search", params=query) save_request_and_response_for_docs("search_options", response) def test_documentation_search_multiple_paths(self): self.portal.invokeFactory("Folder", id="folder1", title="Folder 1") - self.portal.folder1.invokeFactory("Document", id="doc1", title="Lorem Ipsum") + self.portal.folder1.invokeFactory( + "Document", id="doc1", title="Lorem Ipsum" + ) self.portal.invokeFactory("Folder", id="folder2", title="Folder 2") - self.portal.folder2.invokeFactory("Document", id="doc2", title="Lorem Ipsum") + self.portal.folder2.invokeFactory( + "Document", id="doc2", title="Lorem Ipsum" + ) transaction.commit() query = { "sort_on": "path", @@ -454,7 +484,10 @@ def test_documentation_search_multiple_paths(self): def test_documentation_search_metadata_fields(self): self.portal.invokeFactory("Document", id="doc1", title="Lorem Ipsum") transaction.commit() - query = {"SearchableText": "lorem", "metadata_fields": ["modified", "created"]} + query = { + "SearchableText": "lorem", + "metadata_fields": ["modified", "created"], + } response = self.api_session.get("/@search", params=query) save_request_and_response_for_docs("search_metadata_fields", response) @@ -499,7 +532,8 @@ def test_documentation_registry_get(self): def test_documentation_registry_update(self): response = self.api_session.patch( - "/@registry/", json={"plone.app.querystring.field.path.title": "Value"} + "/@registry/", + json={"plone.app.querystring.field.path.title": "Value"}, ) save_request_and_response_for_docs("registry_update", response) @@ -525,7 +559,9 @@ def test_documentation_types_document_crud(self): "description": "Contact information", }, ) - save_request_and_response_for_docs("types_document_post_fieldset", response) + save_request_and_response_for_docs( + "types_document_post_fieldset", response + ) # Add field response = self.api_session.post( @@ -545,9 +581,7 @@ def test_documentation_types_document_crud(self): document_schema_re = re.compile( r"^plone.dexterity.schema.generated.plone_5_\d*_2_\d*_0_Document$" ) - stable_behavior = ( - "plone.dexterity.schema.generated.plone_5_1234567890_2_123456_0_Document" - ) + stable_behavior = "plone.dexterity.schema.generated.plone_5_1234567890_2_123456_0_Document" json_response = response.json() response_text_override = "" behavior = json_response.get("behavior") @@ -580,7 +614,9 @@ def test_documentation_types_document_crud(self): # Get fieldset response = self.api_session.get("/@types/Document/contact_info") - save_request_and_response_for_docs("types_document_get_fieldset", response) + save_request_and_response_for_docs( + "types_document_get_fieldset", response + ) # Get field response = self.api_session.get("/@types/Document/author_email") @@ -611,7 +647,9 @@ def test_documentation_types_document_crud(self): } }, ) - save_request_and_response_for_docs("types_document_patch_properites", response) + save_request_and_response_for_docs( + "types_document_patch_properites", response + ) # Change field tab / order response = self.api_session.patch( @@ -626,7 +664,9 @@ def test_documentation_types_document_crud(self): ] }, ) - save_request_and_response_for_docs("types_document_patch_fieldsets", response) + save_request_and_response_for_docs( + "types_document_patch_fieldsets", response + ) # Update fieldset settings response = self.api_session.patch( @@ -637,7 +677,9 @@ def test_documentation_types_document_crud(self): "fields": ["author_email"], }, ) - save_request_and_response_for_docs("types_document_patch_fieldset", response) + save_request_and_response_for_docs( + "types_document_patch_fieldset", response + ) # Update field settings response = self.api_session.patch( @@ -650,7 +692,9 @@ def test_documentation_types_document_crud(self): "required": True, }, ) - save_request_and_response_for_docs("types_document_patch_field", response) + save_request_and_response_for_docs( + "types_document_patch_field", response + ) doc_json["layouts"] = ["thumbnail_view", "table_view"] doc_json["fieldsets"] = [ @@ -705,13 +749,17 @@ def test_documentation_types_document_crud(self): response = self.api_session.delete( "/@types/Document/author_email", ) - save_request_and_response_for_docs("types_document_delete_field", response) + save_request_and_response_for_docs( + "types_document_delete_field", response + ) # Remove fieldset response = self.api_session.delete( "/@types/Document/contact_info", ) - save_request_and_response_for_docs("types_document_delete_fieldset", response) + save_request_and_response_for_docs( + "types_document_delete_fieldset", response + ) def test_documentation_jwt_login(self): self.portal.acl_users.jwt_auth._secret = "secret" @@ -783,12 +831,16 @@ def test_documentation_batching(self): ] for i in range(7): folder.invokeFactory( - "Document", id="doc-%s" % str(i + 1), title="Document %s" % str(i + 1) + "Document", + id="doc-%s" % str(i + 1), + title="Document %s" % str(i + 1), ) transaction.commit() query = {"sort_on": "path"} - response = self.api_session.get("/folder/@search?b_size=5", params=query) + response = self.api_session.get( + "/folder/@search?b_size=5", params=query + ) save_request_and_response_for_docs("batching", response) def test_documentation_users(self): @@ -861,7 +913,9 @@ def test_documentation_users_get(self): "location": "Cambridge, MA", } api.user.create( - email="noam.chomsky@example.com", username="noam", properties=properties + email="noam.chomsky@example.com", + username="noam", + properties=properties, ) transaction.commit() response = self.api_session.get("@users/noam") @@ -877,7 +931,9 @@ def test_documentation_users_anonymous_get(self): "location": "Cambridge, MA", } api.user.create( - email="noam.chomsky@example.com", username="noam", properties=properties + email="noam.chomsky@example.com", + username="noam", + properties=properties, ) transaction.commit() @@ -1006,7 +1062,9 @@ def test_documentation_users_update(self): "location": "Cambridge, MA", } api.user.create( - email="noam.chomsky@example.com", username="noam", properties=properties + email="noam.chomsky@example.com", + username="noam", + properties=properties, ) transaction.commit() @@ -1036,7 +1094,9 @@ def test_documentation_users_update_portrait(self): response_get = self.api_session.get("/@users/noam", json=payload) save_request_and_response_for_docs("users_update_portrait", response) - save_request_and_response_for_docs("users_update_portrait_get", response_get) + save_request_and_response_for_docs( + "users_update_portrait_get", response_get + ) def test_documentation_users_update_portrait_with_scale(self): payload = { @@ -1052,7 +1112,9 @@ def test_documentation_users_update_portrait_with_scale(self): transaction.commit() response = self.api_session.patch("/@users/noam", json=payload) - save_request_and_response_for_docs("users_update_portrait_scale", response) + save_request_and_response_for_docs( + "users_update_portrait_scale", response + ) def test_documentation_users_delete(self): properties = { @@ -1064,7 +1126,9 @@ def test_documentation_users_delete(self): "location": "Cambridge, MA", } api.user.create( - email="noam.chomsky@example.com", username="noam", properties=properties + email="noam.chomsky@example.com", + username="noam", + properties=properties, ) transaction.commit() @@ -1164,7 +1228,10 @@ def test_documentation_groups_update(self): response = self.api_session.patch( "/@groups/ploneteam", - json={"email": "ploneteam2@plone.org", "users": {TEST_USER_ID: False}}, + json={ + "email": "ploneteam2@plone.org", + "users": {TEST_USER_ID: False}, + }, ) save_request_and_response_for_docs("groups_update", response) @@ -1214,7 +1281,10 @@ def test_documentation_navigation_tree(self): folder, u"Folder", id=u"subfolder2", title=u"SubFolder 2" ) thirdlevelfolder = createContentInContainer( - subfolder1, u"Folder", id=u"thirdlevelfolder", title=u"Third Level Folder" + subfolder1, + u"Folder", + id=u"thirdlevelfolder", + title=u"Third Level Folder", ) createContentInContainer( thirdlevelfolder, @@ -1222,7 +1292,9 @@ def test_documentation_navigation_tree(self): id=u"fourthlevelfolder", title=u"Fourth Level Folder", ) - createContentInContainer(folder, u"Document", id=u"doc1", title=u"A document") + createContentInContainer( + folder, u"Document", id=u"doc1", title=u"A document" + ) transaction.commit() response = self.api_session.get( @@ -1245,7 +1317,10 @@ def test_documentation_contextnavigation(self): folder, u"Folder", id=u"subfolder2", title=u"SubFolder 2" ) thirdlevelfolder = createContentInContainer( - subfolder1, u"Folder", id=u"thirdlevelfolder", title=u"Third Level Folder" + subfolder1, + u"Folder", + id=u"thirdlevelfolder", + title=u"Third Level Folder", ) createContentInContainer( thirdlevelfolder, @@ -1253,7 +1328,9 @@ def test_documentation_contextnavigation(self): id=u"fourthlevelfolder", title=u"Fourth Level Folder", ) - createContentInContainer(folder, u"Document", id=u"doc1", title=u"A document") + createContentInContainer( + folder, u"Document", id=u"doc1", title=u"A document" + ) transaction.commit() response = self.api_session.get( "{}/folder/@contextnavigation".format(self.portal.absolute_url()) @@ -1276,7 +1353,9 @@ def test_documentation_principals(self): description=properties["description"], ) transaction.commit() - response = self.api_session.get("/@principals", params={"search": "ploneteam"}) + response = self.api_session.get( + "/@principals", params={"search": "ploneteam"} + ) save_request_and_response_for_docs("principals", response) def test_documentation_copy(self): @@ -1286,13 +1365,20 @@ def test_documentation_copy(self): save_request_and_response_for_docs("copy", response) def test_documentation_copy_multiple(self): - newsitem = self.portal[self.portal.invokeFactory("News Item", id="newsitem")] + newsitem = self.portal[ + self.portal.invokeFactory("News Item", id="newsitem") + ] newsitem.title = "My News Item" transaction.commit() response = self.api_session.post( "/@copy", - json={"source": [self.document.absolute_url(), newsitem.absolute_url()]}, + json={ + "source": [ + self.document.absolute_url(), + newsitem.absolute_url(), + ] + }, ) save_request_and_response_for_docs("copy_multiple", response) @@ -1320,7 +1406,8 @@ def test_documentation_vocabularies_get_fields(self): def test_documentation_vocabularies_get_filtered_by_title(self): response = self.api_session.get( - "/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?" "title=doc" + "/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?" + "title=doc" ) save_request_and_response_for_docs( "vocabularies_get_filtered_by_title", response @@ -1337,10 +1424,15 @@ def test_documentation_vocabularies_get_filtered_by_token(self): def test_documentation_sources_get(self): api.content.create( - container=self.portal, id="doc", type="DXTestDocument", title=u"DX Document" + container=self.portal, + id="doc", + type="DXTestDocument", + title=u"DX Document", ) transaction.commit() - response = self.api_session.get("/doc/@sources/test_choice_with_source") + response = self.api_session.get( + "/doc/@sources/test_choice_with_source" + ) save_request_and_response_for_docs("sources_get", response) def test_documentation_sharing_folder_get(self): @@ -1465,7 +1557,9 @@ def clean_final_url(response, _id="document-2016-10-21"): save_request_and_response_for_docs("tusupload_patch", response) # HEAD ask for much the server has - response = self.api_session.head(upload_url, headers={"Tus-Resumable": "1.0.0"}) + response = self.api_session.head( + upload_url, headers={"Tus-Resumable": "1.0.0"} + ) clean_upload_url(response) save_request_and_response_for_docs("tusupload_head", response) @@ -1481,7 +1575,9 @@ def clean_final_url(response, _id="document-2016-10-21"): ) clean_upload_url(response) clean_final_url(response) - save_request_and_response_for_docs("tusupload_patch_finalized", response) + save_request_and_response_for_docs( + "tusupload_patch_finalized", response + ) def test_tusreplace_post_patch(self): self.portal.invokeFactory("File", id="myfile") @@ -1547,7 +1643,9 @@ def test_locking_lock_nonstealable_and_timeout(self): b' "0.684672730996-0.25195226375-00105A989226:1477076400.000"', # noqa response.content, ) - save_request_and_response_for_docs("lock_nonstealable_timeout", response) + save_request_and_response_for_docs( + "lock_nonstealable_timeout", response + ) def test_locking_unlock(self): url = "{}/@lock".format(self.document.absolute_url()) @@ -1603,7 +1701,9 @@ def test_querystring_get(self): def test_querystringsearch_post(self): url = "/@querystring-search" - self.portal.invokeFactory("Document", "testdocument", title="Test Document") + self.portal.invokeFactory( + "Document", "testdocument", title="Test Document" + ) transaction.commit() response = self.api_session.post( @@ -1664,14 +1764,20 @@ def create_document(self): def test_translate_messages_types(self): response = self.api_session.get("/@types") - save_request_and_response_for_docs("translated_messages_types", response) + save_request_and_response_for_docs( + "translated_messages_types", response + ) def test_translate_messages_types_folder(self): response = self.api_session.get("/@types/Folder") - save_request_and_response_for_docs("translated_messages_types_folder", response) + save_request_and_response_for_docs( + "translated_messages_types_folder", response + ) def test_translate_messages_object_workflow(self): - response = self.api_session.get("{}/@workflow".format(self.document.id)) + response = self.api_session.get( + "{}/@workflow".format(self.document.id) + ) save_request_and_response_for_docs( "translated_messages_object_workflow", response ) @@ -1752,7 +1858,9 @@ def clean_comment_id_from_urls(response, _id="123456"): # and the body if response.request.body: - response.request.body = re.sub(pattern_bytes, repl, response.request.body) + response.request.body = re.sub( + pattern_bytes, repl, response.request.body + ) # and the response if response.content: @@ -1793,7 +1901,9 @@ def test_comments_add_root(self): def test_comments_add_sub(self): # Add a reply - url = "{}/@comments/{}".format(self.document.absolute_url(), self.comment_id) + url = "{}/@comments/{}".format( + self.document.absolute_url(), self.comment_id + ) payload = {"text": "My reply"} response = self.api_session.post(url, json=payload) @@ -1801,14 +1911,18 @@ def test_comments_add_sub(self): save_request_and_response_for_docs("comments_add_sub", response) def test_comments_update(self): - url = "{}/@comments/{}".format(self.document.absolute_url(), self.comment_id) + url = "{}/@comments/{}".format( + self.document.absolute_url(), self.comment_id + ) payload = {"text": "My NEW comment"} response = self.api_session.patch(url, json=payload) self.clean_comment_id_from_urls(response) save_request_and_response_for_docs("comments_update", response) def test_comments_delete(self): - url = "{}/@comments/{}".format(self.document.absolute_url(), self.comment_id) + url = "{}/@comments/{}".format( + self.document.absolute_url(), self.comment_id + ) response = self.api_session.delete(url) self.clean_comment_id_from_urls(response) save_request_and_response_for_docs("comments_delete", response) @@ -1819,7 +1933,9 @@ def test_roles_get(self): save_request_and_response_for_docs("roles", response) def test_documentation_expansion(self): - response = self.api_session.get("/front-page?expand=breadcrumbs,workflow") + response = self.api_session.get( + "/front-page?expand=breadcrumbs,workflow" + ) save_request_and_response_for_docs("expansion", response) @@ -1838,7 +1954,9 @@ def test_controlpanels_get_item(self): def test_controlpanels_get_dexterity(self): response = self.api_session.get("/@controlpanels/dexterity-types") - save_request_and_response_for_docs("controlpanels_get_dexterity", response) + save_request_and_response_for_docs( + "controlpanels_get_dexterity", response + ) def test_controlpanels_crud_dexterity(self): # POST @@ -1857,7 +1975,9 @@ def test_controlpanels_crud_dexterity(self): response = self.api_session.get( "/@controlpanels/dexterity-types/my_custom_content_type" ) - save_request_and_response_for_docs("controlpanels_get_dexterity_item", response) + save_request_and_response_for_docs( + "controlpanels_get_dexterity_item", response + ) # PATCH response = self.api_session.patch( @@ -1883,7 +2003,8 @@ def test_controlpanels_crud_dexterity(self): @unittest.skipUnless( - PAM_INSTALLED, "plone.app.multilingual is installed by default only in Plone 5" + PAM_INSTALLED, + "plone.app.multilingual is installed by default only in Plone 5", ) # NOQA class TestPAMDocumentation(TestDocumentationBase): @@ -1898,10 +2019,18 @@ def setUp(self): # When we have tried to apply it for LRFs we have had several # utility registration problems. # - setattr(self.portal.en, "_plone.uuid", "00000000000000000000000000000001") - setattr(self.portal.es, "_plone.uuid", "00000000000000000000000000000002") - setattr(self.portal.fr, "_plone.uuid", "00000000000000000000000000000003") - setattr(self.portal.de, "_plone.uuid", "00000000000000000000000000000004") + setattr( + self.portal.en, "_plone.uuid", "00000000000000000000000000000001" + ) + setattr( + self.portal.es, "_plone.uuid", "00000000000000000000000000000002" + ) + setattr( + self.portal.fr, "_plone.uuid", "00000000000000000000000000000003" + ) + setattr( + self.portal.de, "_plone.uuid", "00000000000000000000000000000004" + ) en_id = self.portal["en"].invokeFactory( "Document", id="test-document", title="Test document" @@ -1913,12 +2042,6 @@ def setUp(self): self.es_content = self.portal["es"].get(es_id) transaction.commit() -<<<<<<< HEAD - def tearDown(self): - super(TestPAMDocumentation, self).tearDown() - -======= ->>>>>>> bd9eb3da (@site and @navroot endpoints (#1465)) def test_documentation_translations_post(self): response = self.api_session.post( "{}/@translations".format(self.en_content.absolute_url()), @@ -1929,7 +2052,11 @@ def test_documentation_translations_post(self): def test_documentation_translations_post_by_id(self): response = self.api_session.post( "{}/@translations".format(self.en_content.absolute_url()), - json={"id": self.es_content.absolute_url().replace(self.portal_url, "")}, + json={ + "id": self.es_content.absolute_url().replace( + self.portal_url, "" + ) + }, ) save_request_and_response_for_docs("translations_post_by_id", response) @@ -1938,10 +2065,14 @@ def test_documentation_translations_post_by_uid(self): "{}/@translations".format(self.en_content.absolute_url()), json={"id": self.es_content.UID()}, ) - save_request_and_response_for_docs("translations_post_by_uid", response) + save_request_and_response_for_docs( + "translations_post_by_uid", response + ) def test_documentation_translations_get(self): - ITranslationManager(self.en_content).register_translation("es", self.es_content) + ITranslationManager(self.en_content).register_translation( + "es", self.es_content + ) transaction.commit() response = self.api_session.get( @@ -1951,7 +2082,9 @@ def test_documentation_translations_get(self): save_request_and_response_for_docs("translations_get", response) def test_documentation_translations_delete(self): - ITranslationManager(self.en_content).register_translation("es", self.es_content) + ITranslationManager(self.en_content).register_translation( + "es", self.es_content + ) transaction.commit() response = self.api_session.delete( "{}/@translations".format(self.en_content.absolute_url()), @@ -1970,7 +2103,9 @@ def test_documentation_translations_link_on_post(self): "language": "de", }, ) - save_request_and_response_for_docs("translations_link_on_post", response) + save_request_and_response_for_docs( + "translations_link_on_post", response + ) def test_documentation_translation_locator(self): response = self.api_session.get( @@ -1992,7 +2127,9 @@ def test_site_navroot_language_folder_get(self): def test_site_navroot_language_content_get(self): response = self.api_session.get("/en/test-document/@navroot") - save_request_and_response_for_docs("navroot_lang_content_get", response) + save_request_and_response_for_docs( + "navroot_lang_content_get", response + ) def test_site_expansion_navroot(self): response = self.api_session.get("?expand=navroot") @@ -2000,12 +2137,12 @@ def test_site_expansion_navroot(self): def test_site_expansion_navroot_language_folder(self): response = self.api_session.get("/en?expand=navroot") - save_request_and_response_for_docs("site_get_expand_lang_folder", response) + save_request_and_response_for_docs( + "site_get_expand_lang_folder", response + ) def test_site_expansion_navroot_language_folder_content(self): response = self.api_session.get("/en/test-document?expand=navroot") save_request_and_response_for_docs( "site_get_expand_lang_folder_content", response ) - -