Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit a3924f4

Browse files
committed
fix casing in example
1 parent 548a9c7 commit a3924f4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

influxdb/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ def get_list_grants(self, username):
782782
783783
>> grants = client.get_list_grants("todd")
784784
>> grants
785-
[{u'database': u'db1', u'privilege': u'read'}, {u'database': u'db2', u'privilege': u'write'}]
785+
[{u'database': u'db1', u'privilege': u'READ'}, {u'database': u'db2', u'privilege': u'ALL PRIVILEGES'}]
786786
"""
787787
text = "SHOW GRANTS FOR {0}".format(username)
788788
return list(self.query(text).get_points())

influxdb/tests/client_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,16 +846,16 @@ def test_get_list_grants(self):
846846
{'series': [
847847
{'columns': ['database', 'privilege'],
848848
'values': [
849-
['db1', 'read'],
850-
['db2', 'all']]}
849+
['db1', 'READ'],
850+
['db2', 'ALL PRIVILEGES']]}
851851
]}
852852
]}
853853

854854
with _mocked_session(self.cli, 'get', 200, json.dumps(data)):
855855
self.assertListEqual(
856856
self.cli.get_list_grants('test'),
857-
[{'database': 'db1', 'privilege': 'read'},
858-
{'database': 'db2', 'privilege': 'all'}, ]
857+
[{'database': 'db1', 'privilege': 'READ'},
858+
{'database': 'db2', 'privilege': 'ALL PRIVILEGES'}, ]
859859
)
860860

861861
@raises(Exception)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy