1#!/usr/bin/python 2# 3# Copyright 2010 Google Inc. All Rights Reserved. 4 5__author__ = 'asharif@google.com (Ahmad Sharif)' 6 7import unittest 8from automation.common import machine 9from automation.server import machine_manager 10 11 12class MachineManagerTest(unittest.TestCase): 13 14 def setUp(self): 15 self.machine_manager = machine_manager.MachineManager() 16 17 def testPrint(self): 18 print self.machine_manager 19 20 def testGetLinuxBox(self): 21 mach_spec_list = [machine.MachineSpecification(os='linux')] 22 machines = self.machine_manager.GetMachines(mach_spec_list) 23 self.assertTrue(machines) 24 25 def testGetChromeOSBox(self): 26 mach_spec_list = [machine.MachineSpecification(os='chromeos')] 27 machines = self.machine_manager.GetMachines(mach_spec_list) 28 self.assertTrue(machines) 29 30 31if __name__ == '__main__': 32 unittest.main() 33