本文整理汇总了Python中DIRAC.RequestManagementSystem.Client.Request.Request.get方法的典型用法代码示例。如果您正苦于以下问题:Python Request.get方法的具体用法?Python Request.get怎么用?Python Request.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.RequestManagementSystem.Client.Request.Request
的用法示例。
在下文中一共展示了Request.get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test06Dirty
# 需要导入模块: from DIRAC.RequestManagementSystem.Client.Request import Request [as 别名]
# 或者: from DIRAC.RequestManagementSystem.Client.Request.Request import get [as 别名]
def test06Dirty( self ):
""" dirty records """
db = RequestDB()
r = Request()
r.RequestName = "dirty"
op1 = Operation( { "Type": "ReplicateAndRegister", "TargetSE": "CERN-USER"} )
op1 += File( {"LFN": "/a/b/c/1", "Status": "Scheduled", "Checksum": "123456", "ChecksumType": "ADLER32" } )
op2 = Operation( { "Type": "ReplicateAndRegister", "TargetSE": "CERN-USER"} )
op2 += File( {"LFN": "/a/b/c/2", "Status": "Scheduled", "Checksum": "123456", "ChecksumType": "ADLER32" } )
op3 = Operation( { "Type": "ReplicateAndRegister", "TargetSE": "CERN-USER"} )
op3 += File( {"LFN": "/a/b/c/3", "Status": "Scheduled", "Checksum": "123456", "ChecksumType": "ADLER32" } )
r += op1
r += op2
r += op3
put = db.putRequest( r )
self.assertEqual( put["OK"], True, "1. putRequest failed: %s" % put.get( "Message", "" ) )
reqID = put['Value']
r = db.getRequest( reqID )
self.assertEqual( r["OK"], True, "1. getRequest failed: %s" % r.get( "Message", "" ) )
r = r["Value"]
del r[0]
self.assertEqual( len( r ), 2, "1. len wrong" )
put = db.putRequest( r )
self.assertEqual( put["OK"], True, "2. putRequest failed: %s" % put.get( "Message", "" ) )
reqID = put['Value']
r = db.getRequest( reqID )
self.assertEqual( r["OK"], True, "2. getRequest failed: %s" % r.get( "Message", "" ) )
r = r["Value"]
self.assertEqual( len( r ), 2, "2. len wrong" )
op4 = Operation( { "Type": "ReplicateAndRegister", "TargetSE": "CERN-USER"} )
op4 += File( {"LFN": "/a/b/c/4", "Status": "Scheduled", "Checksum": "123456", "ChecksumType": "ADLER32" } )
r[0] = op4
put = db.putRequest( r )
self.assertEqual( put["OK"], True, "3. putRequest failed: %s" % put.get( "Message", "" ) )
reqID = put['Value']
r = db.getRequest( reqID )
self.assertEqual( r["OK"], True, "3. getRequest failed: %s" % r.get( "Message", "" ) )
r = r["Value"]
self.assertEqual( len( r ), 2, "3. len wrong" )
delete = db.deleteRequest( reqID )
self.assertEqual( delete["OK"], True, delete['Message'] if 'Message' in delete else 'OK' )