本文整理汇总了Python中WMCore.Services.Service.Service.getData方法的典型用法代码示例。如果您正苦于以下问题:Python Service.getData方法的具体用法?Python Service.getData怎么用?Python Service.getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.Services.Service.Service
的用法示例。
在下文中一共展示了Service.getData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testStaleCache
# 需要导入模块: from WMCore.Services.Service import Service [as 别名]
# 或者: from WMCore.Services.Service.Service import getData [as 别名]
def testStaleCache(self):
myConfig = {'logger': self.logger,
'endpoint': 'https://github.com/dmwm',
'usestalecache': True,
}
service = Service(myConfig)
service.getData('%s/socketresettest' % self.testDir, '/WMCore/blob/master/setup.py#L11')
self.assertEqual(service['usestalecache'], myConfig['usestalecache'])
示例2: testSocketTimeout
# 需要导入模块: from WMCore.Services.Service import Service [as 别名]
# 或者: from WMCore.Services.Service.Service import getData [as 别名]
def testSocketTimeout(self):
myConfig = {'logger': self.logger,
'endpoint': 'https://github.com/dmwm',
'cacheduration': None,
'timeout': 10,
}
service = Service(myConfig)
service.getData('%s/socketresettest' % self.testDir, '/WMCore/blob/master/setup.py#L11')
self.assertEqual(service['timeout'], myConfig['timeout'])
示例3: testSocketTimeout
# 需要导入模块: from WMCore.Services.Service import Service [as 别名]
# 或者: from WMCore.Services.Service.Service import getData [as 别名]
def testSocketTimeout(self):
dict = {'logger': self.logger,
'endpoint': 'https://github.com/dmwm',
'cacheduration': None,
'timeout': 10,
}
service = Service(dict)
deftimeout = socket.getdefaulttimeout()
service.getData('%s/socketresettest' % self.testDir, '/WMCore/blob/master/setup.py#L11')
assert deftimeout == socket.getdefaulttimeout()