Index: recipe_modules/context/test_api.py |
diff --git a/recipe_modules/context/test_api.py b/recipe_modules/context/test_api.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..81ce74bd798e65c57fbe6548fadebdd3cefe04a9 |
--- /dev/null |
+++ b/recipe_modules/context/test_api.py |
@@ -0,0 +1,15 @@ |
+# Copyright 2017 The LUCI Authors. All rights reserved. |
+# Use of this source code is governed under the Apache License, Version 2.0 |
+# that can be found in the LICENSE file. |
+ |
+from recipe_engine import recipe_test_api |
+ |
+class ContextTestApi(recipe_test_api.RecipeTestApi): |
+ @recipe_test_api.mod_test_data |
+ @staticmethod |
+ def luci_context(ctx): |
+ """Completely mocks LUCI_CONTEXT values.""" |
iannucci
2017/08/04 18:55:51
I would say something like "Sets the initial LUCI_
|
+ # TODO: more validation |
+ if not isinstance(ctx, dict): # pragma: no cover |
+ raise TypeError('Expecting a dict') |
+ return ctx |