Home | History | Annotate | Download | only in hosts
      1 #!/usr/bin/python
      2 # pylint: disable=missing-docstring
      3 
      4 import unittest
      5 import common
      6 
      7 from autotest_lib.server.hosts import cros_host
      8 from autotest_lib.server.hosts import servo_host
      9 
     10 
     11 class DictFilteringTestCase(unittest.TestCase):
     12 
     13     """Tests for dict filtering methods on CrosHost."""
     14 
     15     def test_get_chameleon_arguments(self):
     16         got = cros_host.CrosHost.get_chameleon_arguments({
     17             'chameleon_host': 'host',
     18             'spam': 'eggs',
     19         })
     20         self.assertEqual(got, {'chameleon_host': 'host'})
     21 
     22     def test_get_plankton_arguments(self):
     23         got = cros_host.CrosHost.get_plankton_arguments({
     24             'plankton_host': 'host',
     25             'spam': 'eggs',
     26         })
     27         self.assertEqual(got, {'plankton_host': 'host'})
     28 
     29     def test_get_servo_arguments(self):
     30         got = cros_host.CrosHost.get_servo_arguments({
     31             servo_host.SERVO_HOST_ATTR: 'host',
     32             'spam': 'eggs',
     33         })
     34         self.assertEqual(got, {servo_host.SERVO_HOST_ATTR: 'host'})
     35 
     36 
     37 if __name__ == "__main__":
     38     unittest.main()
     39