Home | History | Annotate | Download | only in hosts
      1 #!/usr/bin/python
      2 #
      3 # Copyright 2015 The Chromium OS Authors. All rights reserved.
      4 # Use of this source code is governed by a BSD-style license that can be
      5 # found in the LICENSE file.
      6 
      7 import unittest
      8 
      9 import common
     10 from autotest_lib.server.hosts import servo_host
     11 
     12 
     13 class ServoAfeBoardMapTest(unittest.TestCase):
     14     """Tests for how we map AFE boards to servo boards."""
     15 
     16     def test_afe_board_mapping(self):
     17         """Tests mappings."""
     18         afe_map = servo_host._map_afe_board_to_servo_board
     19         self.assertEqual(afe_map('kip'), 'kip')
     20         self.assertEqual(afe_map('gizmo'), 'panther')
     21         self.assertEqual(afe_map('link_freon'), 'link')
     22         self.assertEqual(afe_map('nyan_blaze-freon'), 'nyan_blaze')
     23         self.assertEqual(afe_map('stumpy_moblab'), 'stumpy')
     24         self.assertEqual(afe_map('veyron_minnie-cheets'), 'veyron_minnie')
     25 
     26 
     27 if __name__ == '__main__':
     28     unittest.main()
     29