#NEWLINE# def test_admin_revoke_privileges_positive( self ) : #NEWLINE# #INDENT# '\n            revoke privileges positive\n        ' #NEWLINE# status = self . client . admin_grant_privileges ( 'usr-sys-admin-test' , [ { #NEWLINE# #INDENT# 'code' : aerospike . PRIV_READ , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# assert ( status == 0 ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# roles = self . client . admin_query_role ( 'usr-sys-admin-test' ) #NEWLINE# assert ( roles == [ { #NEWLINE# #INDENT# 'code' : 0 , #NEWLINE# 'ns' : '' , #NEWLINE# 'set' : '' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'code' : 1 , #NEWLINE# 'ns' : '' , #NEWLINE# 'set' : '' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'code' : 10 , #NEWLINE# 'ns' : '' , #NEWLINE# 'set' : '' , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# status = self . client . admin_revoke_privileges ( 'usr-sys-admin-test' , [ { #NEWLINE# #INDENT# 'code' : aerospike . PRIV_READ , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# assert ( status == 0 ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# roles = self . client . admin_query_role ( 'usr-sys-admin-test' ) #NEWLINE# assert ( roles == [ { #NEWLINE# #INDENT# 'code' : 0 , #NEWLINE# 'ns' : '' , #NEWLINE# 'set' : '' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'code' : 1 , #NEWLINE# 'ns' : '' , #NEWLINE# 'set' : '' , #NEWLINE# #UNINDENT# } ] )