blob: 3781bab55d890af0dc36a73df1a79892b6380b14 [file] [log] [blame]
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine import recipe_test_api
class BuilderStateTestApi(recipe_test_api.RecipeTestApi):
def __call__(self, state):
previous_run = self.m.buildbucket.ci_build_message()
previous_run.output.properties["state"] = self.m.json.dumps(state)
return self.m.buildbucket.simulated_search_results(
[self.m.buildbucket.ci_build_message(), previous_run],
step_name="fetch previous build state",
)