blob: 8a6f2b45c7364ef464de924dde388a56e1a5e206 [file] [log] [blame]
#!/usr/bin/python
# pylint: disable=missing-docstring
import unittest
import common
from autotest_lib.client.common_lib.test_utils import mock
from autotest_lib.client.bin import harness, harness_standalone
class harness_unittest(unittest.TestCase):
def setUp(self):
self.god = mock.mock_god()
def tearDown(self):
self.god.unstub_all()
def test_select_none(self):
job = object()
self.god.stub_class(harness_standalone, "harness_standalone")
harness_args = ''
harness_standalone.harness_standalone.expect_new(job, harness_args)
harness.select(None, job, harness_args)
self.god.check_playback()
def test_select_standalone(self):
job = object()
self.god.stub_class(harness_standalone, "harness_standalone")
harness_args = ''
harness_standalone.harness_standalone.expect_new(job, harness_args)
harness.select('standalone', job, harness_args)
self.god.check_playback()
if __name__ == "__main__":
unittest.main()