AIDEGen: Fix aidegen/run_tests.sh failed.

Do not use decorator to mock a function of modules which could
be imported failed, use context manager to mock it instead.

Bug: 139041536
Test: 1. In tools/asuite folder make command:
             aidegen/run_tests.sh
	     All unittests pass!

Change-Id: I9f5cdf3576020531535c0a7c55bdd4e10b7056ee
1 file changed