blob: 1c4641b2569f10c7d18ea01a888ecad250bff134 [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 StateTestApi(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]
)