本文整理汇总了Python中mc_bin_client.MemcachedClient.sasl_mechanisms方法的典型用法代码示例。如果您正苦于以下问题:Python MemcachedClient.sasl_mechanisms方法的具体用法?Python MemcachedClient.sasl_mechanisms怎么用?Python MemcachedClient.sasl_mechanisms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mc_bin_client.MemcachedClient
的用法示例。
在下文中一共展示了MemcachedClient.sasl_mechanisms方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_list_mechs
# 需要导入模块: from mc_bin_client import MemcachedClient [as 别名]
# 或者: from mc_bin_client.MemcachedClient import sasl_mechanisms [as 别名]
def test_list_mechs(self):
nodes = RestConnection(self.master).get_nodes()
for n in nodes:
if n.ip == self.master.ip and n.port == self.master.port:
node = n
client = MemcachedClient(self.master.ip, node.memcached)
mechs = list(client.sasl_mechanisms())
assert "CRAM-MD5" in mechs
assert "PLAIN" in mechs
assert len(list(mechs)) == 2
示例2: test_list_mechs
# 需要导入模块: from mc_bin_client import MemcachedClient [as 别名]
# 或者: from mc_bin_client.MemcachedClient import sasl_mechanisms [as 别名]
def test_list_mechs(self):
nodes = RestConnection(self.master).get_nodes()
for n in nodes:
if n.ip == self.master.ip and n.port == self.master.port:
node = n
client = MemcachedClient(self.master.ip, node.memcached)
mechs = list(client.sasl_mechanisms())
self.log.info("Start check mech types")
assert "SCRAM-SHA1" in mechs
assert "SCRAM-SHA256" in mechs
assert "SCRAM-SHA512" in mechs
assert "PLAIN" in mechs
assert len(list(mechs)) == 4