Skip to content

Commit eb860ed

Browse files
author
aviau
committed
added test_update_cluster_admin_password
1 parent 60a6d6b commit eb860ed

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tests/influxdb/client_test.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,22 @@ def test_add_cluster_admin(self):
296296
pass
297297

298298
def test_update_cluster_admin_password(self):
299-
pass
299+
with requests_mock.Mocker() as m:
300+
m.register_uri(
301+
requests_mock.POST,
302+
"http://localhost:8086/cluster_admins/paul"
303+
)
304+
305+
cli = InfluxDBClient(database='db')
306+
cli.update_cluster_admin_password(
307+
username='paul',
308+
new_password='laup'
309+
)
310+
311+
self.assertDictEqual(
312+
json.loads(m.last_request.body),
313+
{'password': 'laup'}
314+
)
300315

301316
def test_delete_cluster_admin(self):
302317
pass

0 commit comments

Comments
 (0)