Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ information.

.. testcode::

from arango import ArangoClient
from arango import ArangoClient, Request

# Initialize the ArangoDB client.
client = ArangoClient()
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Loading