[autotest] Move rpc_utils import in site_rpc_interface.py

In order to allow for unit tests of site_rpc_interface.py, we
need to avoid importing autotest_lib.frontend.afe.rpc_utils, as
it pulls in and tries to set up django.  The current mechanism
seems to be a bit flaky, so simplify the logic and simply
put the import behind a layer of indirection that can be
mocked out during tests.

BUG=chromium-os:27074
TEST=unit
TEST=./cli/atest suite create -b x86-mario -i x86-mario-release/R19-1932.0.0-a1-b1751 dummy

Change-Id: I0b331128a317fcf64269964325e051c45aeef023
Reviewed-on: https://gerrit.chromium.org/gerrit/17843
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
1 file changed