[autotest] AFE child jobs table on parent job.

Add a table to list all the child jobs of a parent job on Job View tab.
One can click on and navigate between child and parent.

BUG=chromium:379959
DEPLOY=afe,apache
TEST=ran afe, viewed a job, navigated between parent and child jobs

Change-Id: Id70c41c8f7cee40bd71a206e1f3e08a68efe054f
Reviewed-on: https://chromium-review.googlesource.com/202579
Reviewed-by: Simran Basi <[email protected]>
Commit-Queue: Jiaxi Luo <[email protected]>
Tested-by: Jiaxi Luo <[email protected]>
diff --git a/frontend/afe/rpc_interface_unittest.py b/frontend/afe/rpc_interface_unittest.py
index 6ce76eb..89af961 100755
--- a/frontend/afe/rpc_interface_unittest.py
+++ b/frontend/afe/rpc_interface_unittest.py
@@ -1,7 +1,7 @@
 #pylint: disable-msg=C0111
 #!/usr/bin/python
 
-import datetime, unittest
+import datetime
 import common
 
 from autotest_lib.frontend import setup_django_environment
@@ -12,6 +12,8 @@
 from autotest_lib.client.common_lib import control_data
 from autotest_lib.client.common_lib import error
 from autotest_lib.client.common_lib import priorities
+from autotest_lib.client.common_lib.test_utils import mock
+from autotest_lib.client.common_lib.test_utils import unittest
 
 CLIENT = control_data.CONTROL_TYPE_NAMES.CLIENT
 SERVER = control_data.CONTROL_TYPE_NAMES.SERVER
@@ -23,9 +25,11 @@
                        frontend_test_utils.FrontendTestMixin):
     def setUp(self):
         self._frontend_common_setup()
+        self.god = mock.mock_god()
 
 
     def tearDown(self):
+        self.god.unstub_all()
         self._frontend_common_teardown()
 
 
@@ -138,6 +142,11 @@
         entries[2].aborted = True
         entries[2].save()
 
+        # Mock up tko_rpc_interface.get_status_counts.
+        self.god.stub_function_to_return(rpc_interface.tko_rpc_interface,
+                                         'get_status_counts',
+                                         None)
+
         job_summaries = rpc_interface.get_jobs_summary(id=job.id)
         self.assertEquals(len(job_summaries), 1)
         summary = job_summaries[0]