def stub_out(test, funcs):
    for module, func in funcs.items():
        test.stub_out(module, func)
Set the stubs in mapping in the db api.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/db/fakes.py/stub_out