def test_parse_document_path(): expected = { "project": "nautilus", "knowledge_base": "scallop", "document": "abalone", } path = SessionsClient.document_path(**expected) # Check that the path construction is reversible. actual = SessionsClient.parse_document_path(path) assert expected == actual
def test_document_path(): project = "cuttlefish" knowledge_base = "mussel" document = "winkle" expected = "projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}".format( project=project, knowledge_base=knowledge_base, document=document, ) actual = SessionsClient.document_path(project, knowledge_base, document) assert expected == actual