OLD | NEW |
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Module containing a fake au worker class.""" | 5 """Module containing a fake au worker class.""" |
6 | 6 |
7 import unittest | 7 import unittest |
8 | 8 |
| 9 import cros_build_lib as cros_lib |
| 10 |
9 import au_worker | 11 import au_worker |
10 | 12 |
11 class DummyAUWorker(au_worker.AUWorker): | 13 class DummyAUWorker(au_worker.AUWorker): |
12 """AU worker that emulates work for an au_worker without actually doing work. | 14 """AU worker that emulates work for an au_worker without actually doing work. |
13 | 15 |
14 Collects different updates that would be generated that can be obtained | 16 Collects different updates that would be generated that can be obtained |
15 from the class object delta_list. | 17 from the class object delta_list. |
16 """ | 18 """ |
17 | 19 |
18 # Class variable that stores the list of payloads that would be needed. | 20 # Class variable that stores the list of payloads that would be needed. |
(...skipping 17 matching lines...) Expand all Loading... |
36 src_image_path = self.vm_image_path | 38 src_image_path = self.vm_image_path |
37 self._first_update = False | 39 self._first_update = False |
38 | 40 |
39 # Generate a value that combines delta with private key path. | 41 # Generate a value that combines delta with private key path. |
40 val = src_image_path | 42 val = src_image_path |
41 if private_key_path: val = '%s+%s' % (val, private_key_path) | 43 if private_key_path: val = '%s+%s' % (val, private_key_path) |
42 if not self.delta_list.has_key(image_path): | 44 if not self.delta_list.has_key(image_path): |
43 self.delta_list[image_path] = set([val]) | 45 self.delta_list[image_path] = set([val]) |
44 else: | 46 else: |
45 self.delta_list[image_path].add(val) | 47 self.delta_list[image_path].add(val) |
OLD | NEW |