OLD | NEW |
---|---|
(Empty) | |
1 # Copyright 2017 The LUCI Authors. All rights reserved. | |
2 # Use of this source code is governed under the Apache License, Version 2.0 | |
3 # that can be found in the LICENSE file. | |
4 | |
5 from recipe_engine import recipe_test_api | |
6 | |
7 class ContextTestApi(recipe_test_api.RecipeTestApi): | |
8 @recipe_test_api.mod_test_data | |
9 @staticmethod | |
10 def luci_context(ctx): | |
11 """Completely mocks LUCI_CONTEXT values.""" | |
iannucci
2017/08/04 18:55:51
I would say something like "Sets the initial LUCI_
| |
12 # TODO: more validation | |
13 if not isinstance(ctx, dict): # pragma: no cover | |
14 raise TypeError('Expecting a dict') | |
15 return ctx | |
OLD | NEW |