本文整理汇总了Python中WMCore.Database.CMSCouch.Database.info方法的典型用法代码示例。如果您正苦于以下问题:Python Database.info方法的具体用法?Python Database.info怎么用?Python Database.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.Database.CMSCouch.Database
的用法示例。
在下文中一共展示了Database.info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testSlashInDBName
# 需要导入模块: from WMCore.Database.CMSCouch import Database [as 别名]
# 或者: from WMCore.Database.CMSCouch.Database import info [as 别名]
def testSlashInDBName(self):
"""
Slashes are a valid character in a database name, and are useful as it
creates a directory strucutre for the couch data files.
"""
db_name = 'wmcore/unittests'
try:
self.server.deleteDatabase(db_name)
except:
# Ignore this - the database shouldn't already exist
pass
db = self.server.createDatabase(db_name)
info = db.info()
assert info['db_name'] == db_name
db_name = 'wmcore/unittests'
db = self.server.connectDatabase(db_name)
info = db.info()
assert info['db_name'] == db_name
db = Database(db_name, url = os.environ["COUCHURL"])
info = db.info()
assert info['db_name'] == db_name
self.server.deleteDatabase(db_name)