1#!/usr/bin/python3 2# pylint: disable=missing-docstring 3 4import unittest 5import common 6from autotest_lib.client.common_lib.test_utils import mock 7from autotest_lib.client.bin import harness, harness_standalone 8 9 10class harness_unittest(unittest.TestCase): 11 def setUp(self): 12 self.god = mock.mock_god() 13 14 def tearDown(self): 15 self.god.unstub_all() 16 17 def test_select_none(self): 18 job = object() 19 self.god.stub_class(harness_standalone, "harness_standalone") 20 21 harness_args = '' 22 harness_standalone.harness_standalone.expect_new(job, harness_args) 23 harness.select(None, job, harness_args) 24 self.god.check_playback() 25 26 def test_select_standalone(self): 27 job = object() 28 self.god.stub_class(harness_standalone, "harness_standalone") 29 30 harness_args = '' 31 harness_standalone.harness_standalone.expect_new(job, harness_args) 32 harness.select('standalone', job, harness_args) 33 self.god.check_playback() 34 35 36if __name__ == "__main__": 37 unittest.main() 38