Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Added test for alter_database_admin
Browse files Browse the repository at this point in the history
  • Loading branch information
aviau committed Oct 31, 2014
1 parent 2dcf15b commit 55c1b41
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/influxdb/client_test.py
Expand Up @@ -307,6 +307,26 @@ def test_set_database_admin(self):
def test_unset_database_admin(self):
pass

def test_alter_database_admin(self):
with requests_mock.Mocker() as m:
m.register_uri(
requests_mock.POST,
"http://localhost:8086/db/db/users/paul"
)

cli = InfluxDBClient(database='db')
cli.alter_database_admin(
username='paul',
is_admin=False
)

self.assertDictEqual(
json.loads(m.last_request.body),
{
'admin': False
}
)

@raises(NotImplementedError)
def test_get_list_database_admins(self):
cli = InfluxDBClient('host', 8086, 'username', 'password', 'db')
Expand Down

0 comments on commit 55c1b41

Please sign in to comment.