BuildAPI: Unit test cleanup / additions
BUG=none
TEST=manual,run_tests
Change-Id: I6c2056531bd1ea0f9209264edbf9295671f31697
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1987853
Tested-by: Michael Mortensen <mmortensen@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Michael Mortensen <mmortensen@google.com>
diff --git a/api/controller/sysroot_unittest.py b/api/controller/sysroot_unittest.py
index ec6fba9..d5e304e 100644
--- a/api/controller/sysroot_unittest.py
+++ b/api/controller/sysroot_unittest.py
@@ -167,6 +167,18 @@
self.validate_only_config)
patch.assert_not_called()
+ def testMockCall(self):
+ """Sanity check that a mock call does not execute any logic."""
+ patch = self.PatchObject(sysroot_service, 'CreateSimpleChromeSysroot')
+
+ board = 'board'
+ in_proto = self._InputProto(build_target=board, use_flags=[])
+ rc = sysroot_controller.CreateSimpleChromeSysroot(in_proto,
+ self._OutputProto(),
+ self.mock_call_config)
+ self.assertEqual(controller.RETURN_CODE_SUCCESS, rc)
+ patch.assert_not_called()
+
def testArgumentValidation(self):
"""Test the input argument validation."""
# Error when no build target provided.