[autotest] Fix type error for afe_parent_job_id

cl/1043089 changed the type of afe_parent_job_id from string to int

To keep the proto backward compatible, change the assert that the
tko model type does not match the proto type to a warning and add
an explicit casti from tko model to the proto.

BUG=chromium:842451
TEST=moblab tryjob, unittests, build and testing on moblab.

Change-Id: I62f583785a5b8b001d623b1a104043a50cf9f67b
Reviewed-on: https://chromium-review.googlesource.com/1058439
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Matt Mallett <mattmallett@chromium.org>
diff --git a/tko/job_serializer_unittest.py b/tko/job_serializer_unittest.py
index 4387413..b59ddab 100755
--- a/tko/job_serializer_unittest.py
+++ b/tko/job_serializer_unittest.py
@@ -34,7 +34,7 @@
         tko_job = models.job('/tmp/', 'autotest', 'test', 'My Computer',
                              tko_time, tko_time, tko_time, 'root',
                              'www', 'No one', tko_time, {'1+1':2})
-        tko_job.afe_parent_job_id = '111'
+        tko_job.afe_parent_job_id = 111
         tko_job.build_version = 'R1-1.0.0'
         tko_job.suite = 'bvt'
         tko_job.board = 'alex'
@@ -165,7 +165,7 @@
 
     def test_afe_parent_job_id(self):
         """Test serializing afe_parent_job_id field."""
-        self.assertEqual(self.tko_job.afe_parent_job_id,
+        self.assertEqual(str(self.tko_job.afe_parent_job_id),
                         self.pb_job.afe_parent_job_id)