本文整理匯總了Python中models.Build.put方法的典型用法代碼示例。如果您正苦於以下問題:Python Build.put方法的具體用法?Python Build.put怎麽用?Python Build.put使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models.Build
的用法示例。
在下文中一共展示了Build.put方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _create_results
# 需要導入模塊: from models import Build [as 別名]
# 或者: from models.Build import put [as 別名]
def _create_results(self, branch, platform, builder, test_name, values, timestamps=None):
results = []
for i, value in enumerate(values):
build = Build(branch=branch, platform=platform, builder=builder,
buildNumber=i, revision=100 + i, timestamp=timestamps[i] if timestamps else datetime.now())
build.put()
result = TestResult(name=test_name, build=build, value=value)
result.put()
results.append(result)
return results
示例2: create_build
# 需要導入模塊: from models import Build [as 別名]
# 或者: from models.Build import put [as 別名]
def create_build(build_number, revision):
timestamp = datetime.now().replace(microsecond=0)
build = Build(branch=branch, platform=platform, builder=builder, buildNumber=build_number,
revision=revision, timestamp=timestamp)
build.put()
return build