Do not use contextlib.nested if only mock one function

There are some test cases in test_compute_mgr.py using contextlib.nested
to mock up functions even there is only one function needs to be mocked.

We should use mock.patch.object directly if only mock one function.

Change-Id: I30f05d0dcb442d426358b673f0e638ace8b85e0e
Closes-Bug: #1263602
Merge "Do not use contextlib.nested if only mock one function"