本文整理匯總了Python中pyrax.clouddatabases.CloudDatabaseUser類的典型用法代碼示例。如果您正苦於以下問題:Python CloudDatabaseUser類的具體用法?Python CloudDatabaseUser怎麽用?Python CloudDatabaseUser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了CloudDatabaseUser類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_user_list_user_access
def test_user_list_user_access(self):
inst = self.instance
mgr = inst.manager
user = CloudDatabaseUser(mgr, info={"name": "fake"})
mgr.list_user_access = Mock()
user.list_user_access()
mgr.list_user_access.assert_called_once_with(user)
示例2: test_user_change_password
def test_user_change_password(self):
inst = self.instance
mgr = inst.manager
password = utils.random_unicode()
user = CloudDatabaseUser(mgr, info={"name": "fake"})
mgr.change_user_password = Mock()
user.change_password(password)
mgr.change_user_password.assert_called_once_with(user, password)
示例3: test_delete_user_direct
def test_delete_user_direct(self):
inst = self.instance
mgr = inst.manager
name = utils.random_unicode()
user = CloudDatabaseUser(mgr, info={"name": name})
mgr.delete = Mock()
user.delete()
mgr.delete.assert_called_once_with(name)
示例4: test_user_revoke_user_access
def test_user_revoke_user_access(self):
inst = self.instance
mgr = inst.manager
user = CloudDatabaseUser(mgr, info={"name": "fake"})
db_names = utils.random_unicode()
strict = utils.random_unicode()
mgr.revoke_user_access = Mock()
user.revoke_user_access(db_names, strict=strict)
mgr.revoke_user_access.assert_called_once_with(user, db_names,
strict=strict)
示例5: test_user_update
def test_user_update(self):
inst = self.instance
mgr = inst.manager
name = utils.random_unicode()
password = utils.random_unicode()
host = utils.random_unicode()
user = CloudDatabaseUser(mgr, info={"name": "fake"})
mgr.update = Mock()
user.update(name=name, password=password, host=host)
mgr.update.assert_called_once_with(user, name=name, password=password,
host=host)