[autotest] add a directAFE class which bypasses rpc calls

This CL adds a directAFE object which inherits from frontend.AFE, but
which replaces the underlying RpcClient.run function (responsible for
turning AFE calls into RPC calls) into a function that just makese
direct calls to rpc_interface and site_rpc_interface, bypassing RPC
process. This is desirable in places like test_that, which use an
in-memory process-local sqlite database to back a local afe.

BUG=chromium:236471
TEST=unit tests

Change-Id: Ib89a28be9ebc6f5c4e6ff93a08721ac63ab8b377
Reviewed-on: https://gerrit.chromium.org/gerrit/50383
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
2 files changed