| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 import logging, os, shutil, sys, StringIO | 3 import logging, os, shutil, sys, StringIO |
| 4 import common | 4 import common |
| 5 | 5 |
| 6 from autotest_lib.client.bin import job, setup_job | 6 from autotest_lib.client.bin import job, setup_job |
| 7 from autotest_lib.client.bin import utils | 7 from autotest_lib.client.bin import utils |
| 8 from autotest_lib.client.common_lib import base_job, error, log, packages | 8 from autotest_lib.client.common_lib import base_job, error, log, packages |
| 9 from autotest_lib.client.common_lib import logging_manager, logging_config | 9 from autotest_lib.client.common_lib import logging_manager, logging_config |
| 10 from autotest_lib.client.common_lib import base_job_unittest | 10 from autotest_lib.client.common_lib import base_job_unittest |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 'get_logging_manager', manager()) | 72 'get_logging_manager', manager()) |
| 73 | 73 |
| 74 class options: | 74 class options: |
| 75 tag = '' | 75 tag = '' |
| 76 verbose = False | 76 verbose = False |
| 77 cont = False | 77 cont = False |
| 78 harness = 'stub' | 78 harness = 'stub' |
| 79 hostname = None | 79 hostname = None |
| 80 user = None | 80 user = None |
| 81 log = False | 81 log = False |
| 82 tap_report = None |
| 82 | 83 |
| 83 self.job.__init__(options) | 84 self.job.__init__(options) |
| 84 | 85 |
| 85 | 86 |
| 86 class dummy(object): | 87 class dummy(object): |
| 87 """A simple placeholder for attributes""" | 88 """A simple placeholder for attributes""" |
| 88 pass | 89 pass |
| 89 | 90 |
| 90 | 91 |
| 91 class first_line_comparator(mock.argument_comparator): | 92 class first_line_comparator(mock.argument_comparator): |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 163 |
| 163 resultdir = self._setup_pre_record_init() | 164 resultdir = self._setup_pre_record_init() |
| 164 | 165 |
| 165 # finish constructor | 166 # finish constructor |
| 166 options = dummy() | 167 options = dummy() |
| 167 options.tag = self.jobtag | 168 options.tag = self.jobtag |
| 168 options.log = False | 169 options.log = False |
| 169 options.verbose = False | 170 options.verbose = False |
| 170 options.hostname = 'localhost' | 171 options.hostname = 'localhost' |
| 171 options.user = 'my_user' | 172 options.user = 'my_user' |
| 173 options.tap_report = None |
| 172 self.job.__init__(options) | 174 self.job.__init__(options) |
| 173 | 175 |
| 174 # check | 176 # check |
| 175 self.god.check_playback() | 177 self.god.check_playback() |
| 176 | 178 |
| 177 | 179 |
| 178 def get_partition_mock(self, devname): | 180 def get_partition_mock(self, devname): |
| 179 """ | 181 """ |
| 180 Create a mock of a partition object and return it. | 182 Create a mock of a partition object and return it. |
| 181 """ | 183 """ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 os.mkdir.expect_call(results_dir3) | 238 os.mkdir.expect_call(results_dir3) |
| 237 | 239 |
| 238 # test | 240 # test |
| 239 self.assertEqual(self.job.setup_dirs(None, tmp_dir), | 241 self.assertEqual(self.job.setup_dirs(None, tmp_dir), |
| 240 (results_dir3, tmp_dir)) | 242 (results_dir3, tmp_dir)) |
| 241 self.god.check_playback() | 243 self.god.check_playback() |
| 242 | 244 |
| 243 | 245 |
| 244 if __name__ == "__main__": | 246 if __name__ == "__main__": |
| 245 unittest.main() | 247 unittest.main() |
| OLD | NEW |