diff --git a/docs/database.rst b/docs/database.rst index cc90def3..1b01e0b3 100644 --- a/docs/database.rst +++ b/docs/database.rst @@ -12,7 +12,7 @@ information. .. testcode:: - from arango import ArangoClient + from arango import ArangoClient, Request # Initialize the ArangoDB client. client = ArangoClient() @@ -50,6 +50,13 @@ information. # Make sure that user "jane" has read and write permissions. sys_db.update_permission(username='jane', permission='rw', database='test') + # Example of a custom request + request = Request( + method="get", + endpoint="/_api/version", + ) + response = db.request(request) + # Retrieve various database and server information. db.name db.username diff --git a/tests/test_database.py b/tests/test_database.py index d572ec5b..eebe6324 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -377,7 +377,7 @@ def test_database_misc_methods(client, sys_db, db, bad_db, cluster, secret, db_v method="get", endpoint="/_api/version", ) - response = sys_db.request(request) + response = db.request(request) assert "version" in response.body