Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | |
| 3 | # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | |
| 7 | """Unit tests for autoupdate.py.""" |
| 8 | |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 9 | import json |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 10 | import os |
Chris Sosa | 7c93136 | 2010-10-11 19:49:01 -0700 | [diff] [blame] | 11 | import socket |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 12 | import unittest |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 13 | |
Gilad Arnold | abb352e | 2012-09-23 01:24:27 -0700 | [diff] [blame] | 14 | import cherrypy |
| 15 | import mox |
| 16 | |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 17 | import autoupdate |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 18 | import common_util |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 19 | |
Gilad Arnold | abb352e | 2012-09-23 01:24:27 -0700 | [diff] [blame] | 20 | |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 21 | _TEST_REQUEST = """ |
| 22 | <client_test xmlns:o="http://www.google.com/update2/request" updaterversion="%(client)s" > |
| 23 | <o:app version="%(version)s" track="%(track)s" board="%(board)s" /> |
Chris Sosa | a387a87 | 2010-09-29 11:51:36 -0700 | [diff] [blame] | 24 | <o:updatecheck /> |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 25 | <o:event eventresult="%(event_result)d" eventtype="%(event_type)d" /> |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 26 | </client_test>""" |
| 27 | |
| 28 | |
| 29 | class AutoupdateTest(mox.MoxTestBase): |
| 30 | def setUp(self): |
| 31 | mox.MoxTestBase.setUp(self) |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 32 | self.mox.StubOutWithMock(common_util, 'GetFileSize') |
| 33 | self.mox.StubOutWithMock(common_util, 'GetFileSha1') |
| 34 | self.mox.StubOutWithMock(common_util, 'GetFileSha256') |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 35 | self.mox.StubOutWithMock(autoupdate.Autoupdate, 'GetUpdatePayload') |
| 36 | self.mox.StubOutWithMock(autoupdate.Autoupdate, '_GetLatestImageDir') |
Chris Sosa | 7c93136 | 2010-10-11 19:49:01 -0700 | [diff] [blame] | 37 | self.port = 8080 |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 38 | self.test_board = 'test-board' |
| 39 | self.build_root = '/src_path/build/images' |
| 40 | self.latest_dir = '12345_af_12-a1' |
| 41 | self.latest_verision = '12345_af_12' |
| 42 | self.static_image_dir = '/tmp/static-dir/' |
Chris Sosa | 7c93136 | 2010-10-11 19:49:01 -0700 | [diff] [blame] | 43 | self.hostname = '%s:%s' % (socket.gethostname(), self.port) |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 44 | self.test_dict = { |
| 45 | 'client': 'ChromeOSUpdateEngine-1.0', |
| 46 | 'version': 'ForcedUpdate', |
| 47 | 'track': 'unused_var', |
| 48 | 'board': self.test_board, |
| 49 | 'event_result': 2, |
| 50 | 'event_type': 3 |
| 51 | } |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 52 | self.test_data = _TEST_REQUEST % self.test_dict |
| 53 | self.forced_image_path = '/path_to_force/chromiumos_image.bin' |
| 54 | self.hash = 12345 |
| 55 | self.size = 54321 |
| 56 | self.url = 'http://%s/static/update.gz' % self.hostname |
| 57 | self.payload = 'My payload' |
Chris Sosa | a387a87 | 2010-09-29 11:51:36 -0700 | [diff] [blame] | 58 | self.sha256 = 'SHA LA LA' |
Chris Sosa | 5455586 | 2010-10-25 17:26:17 -0700 | [diff] [blame] | 59 | cherrypy.request.base = 'http://%s' % self.hostname |
| 60 | |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 61 | def _DummyAutoupdateConstructor(self): |
| 62 | """Creates a dummy autoupdater. Used to avoid using constructor.""" |
| 63 | dummy = autoupdate.Autoupdate(root_dir=None, |
Chris Sosa | 7c93136 | 2010-10-11 19:49:01 -0700 | [diff] [blame] | 64 | static_dir=self.static_image_dir, |
| 65 | port=self.port) |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 66 | return dummy |
| 67 | |
Chris Sosa | 744e147 | 2011-09-07 19:32:50 -0700 | [diff] [blame] | 68 | def testGetRightSignedDeltaPayloadDir(self): |
| 69 | """Test that our directory is what we expect it to be for signed updates.""" |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 70 | self.mox.StubOutWithMock(common_util, 'GetFileMd5') |
Chris Sosa | 744e147 | 2011-09-07 19:32:50 -0700 | [diff] [blame] | 71 | key_path = 'test_key_path' |
| 72 | src_image = 'test_src_image' |
| 73 | target_image = 'test_target_image' |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 74 | src_hash = '12345' |
| 75 | target_hash = '67890' |
| 76 | key_hash = 'abcde' |
Chris Sosa | 744e147 | 2011-09-07 19:32:50 -0700 | [diff] [blame] | 77 | |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 78 | common_util.GetFileMd5(src_image).AndReturn(src_hash) |
| 79 | common_util.GetFileMd5(target_image).AndReturn(target_hash) |
| 80 | common_util.GetFileMd5(key_path).AndReturn(key_hash) |
Chris Sosa | 744e147 | 2011-09-07 19:32:50 -0700 | [diff] [blame] | 81 | |
| 82 | self.mox.ReplayAll() |
| 83 | au_mock = self._DummyAutoupdateConstructor() |
| 84 | au_mock.private_key = key_path |
| 85 | update_dir = au_mock.FindCachedUpdateImageSubDir(src_image, target_image) |
Scott Zawalski | 1695453 | 2012-03-20 15:31:36 -0400 | [diff] [blame] | 86 | self.assertEqual(os.path.basename(update_dir), |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 87 | '%s_%s+%s+patched_kernel' % |
| 88 | (src_hash, target_hash, key_hash)) |
Chris Sosa | 744e147 | 2011-09-07 19:32:50 -0700 | [diff] [blame] | 89 | self.mox.VerifyAll() |
| 90 | |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 91 | def testGenerateLatestUpdateImageWithForced(self): |
Don Garrett | f90edf0 | 2010-11-16 17:36:14 -0800 | [diff] [blame] | 92 | self.mox.StubOutWithMock(autoupdate.Autoupdate, |
| 93 | 'GenerateUpdateImageWithCache') |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 94 | autoupdate.Autoupdate._GetLatestImageDir(self.test_board).AndReturn( |
| 95 | '%s/%s/%s' % (self.build_root, self.test_board, self.latest_dir)) |
Don Garrett | f90edf0 | 2010-11-16 17:36:14 -0800 | [diff] [blame] | 96 | autoupdate.Autoupdate.GenerateUpdateImageWithCache( |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 97 | '%s/%s/%s/chromiumos_image.bin' % (self.build_root, self.test_board, |
| 98 | self.latest_dir), |
Don Garrett | f90edf0 | 2010-11-16 17:36:14 -0800 | [diff] [blame] | 99 | static_image_dir=self.static_image_dir).AndReturn('update.gz') |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 100 | |
| 101 | self.mox.ReplayAll() |
| 102 | au_mock = self._DummyAutoupdateConstructor() |
| 103 | self.assertTrue(au_mock.GenerateLatestUpdateImage(self.test_board, |
| 104 | 'ForcedUpdate', |
| 105 | self.static_image_dir)) |
| 106 | self.mox.VerifyAll() |
| 107 | |
| 108 | def testHandleUpdatePingForForcedImage(self): |
Don Garrett | f90edf0 | 2010-11-16 17:36:14 -0800 | [diff] [blame] | 109 | self.mox.StubOutWithMock(autoupdate.Autoupdate, |
| 110 | 'GenerateUpdateImageWithCache') |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 111 | |
| 112 | test_data = _TEST_REQUEST % self.test_dict |
| 113 | |
Don Garrett | f90edf0 | 2010-11-16 17:36:14 -0800 | [diff] [blame] | 114 | autoupdate.Autoupdate.GenerateUpdateImageWithCache( |
Chris Sosa | a387a87 | 2010-09-29 11:51:36 -0700 | [diff] [blame] | 115 | self.forced_image_path, |
Don Garrett | f90edf0 | 2010-11-16 17:36:14 -0800 | [diff] [blame] | 116 | static_image_dir=self.static_image_dir).AndReturn('update.gz') |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 117 | common_util.GetFileSha1(os.path.join( |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 118 | self.static_image_dir, 'update.gz')).AndReturn(self.hash) |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 119 | common_util.GetFileSha256(os.path.join( |
Chris Sosa | a387a87 | 2010-09-29 11:51:36 -0700 | [diff] [blame] | 120 | self.static_image_dir, 'update.gz')).AndReturn(self.sha256) |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 121 | common_util.GetFileSize(os.path.join( |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 122 | self.static_image_dir, 'update.gz')).AndReturn(self.size) |
| 123 | autoupdate.Autoupdate.GetUpdatePayload( |
Andrew de los Reyes | 5679b97 | 2010-10-25 17:34:49 -0700 | [diff] [blame] | 124 | self.hash, self.sha256, self.size, self.url, False).AndReturn( |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 125 | self.payload) |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 126 | |
| 127 | self.mox.ReplayAll() |
| 128 | au_mock = self._DummyAutoupdateConstructor() |
| 129 | au_mock.forced_image = self.forced_image_path |
| 130 | self.assertEqual(au_mock.HandleUpdatePing(test_data), self.payload) |
| 131 | self.mox.VerifyAll() |
| 132 | |
| 133 | def testHandleUpdatePingForLatestImage(self): |
| 134 | self.mox.StubOutWithMock(autoupdate.Autoupdate, 'GenerateLatestUpdateImage') |
| 135 | |
| 136 | test_data = _TEST_REQUEST % self.test_dict |
| 137 | |
| 138 | autoupdate.Autoupdate.GenerateLatestUpdateImage( |
Don Garrett | f90edf0 | 2010-11-16 17:36:14 -0800 | [diff] [blame] | 139 | self.test_board, 'ForcedUpdate', self.static_image_dir).AndReturn( |
| 140 | 'update.gz') |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 141 | common_util.GetFileSha1(os.path.join( |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 142 | self.static_image_dir, 'update.gz')).AndReturn(self.hash) |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 143 | common_util.GetFileSha256(os.path.join( |
Chris Sosa | a387a87 | 2010-09-29 11:51:36 -0700 | [diff] [blame] | 144 | self.static_image_dir, 'update.gz')).AndReturn(self.sha256) |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 145 | common_util.GetFileSize(os.path.join( |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 146 | self.static_image_dir, 'update.gz')).AndReturn(self.size) |
| 147 | autoupdate.Autoupdate.GetUpdatePayload( |
Andrew de los Reyes | 5679b97 | 2010-10-25 17:34:49 -0700 | [diff] [blame] | 148 | self.hash, self.sha256, self.size, self.url, False).AndReturn( |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 149 | self.payload) |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 150 | |
| 151 | self.mox.ReplayAll() |
| 152 | au_mock = self._DummyAutoupdateConstructor() |
| 153 | self.assertEqual(au_mock.HandleUpdatePing(test_data), self.payload) |
Gilad Arnold | 286a006 | 2012-01-12 13:47:02 -0800 | [diff] [blame] | 154 | curr_host_info = au_mock.host_infos.GetHostInfo('127.0.0.1'); |
| 155 | self.assertEqual(curr_host_info.GetAttr('last_known_version'), |
| 156 | 'ForcedUpdate') |
| 157 | self.assertEqual(curr_host_info.GetAttr('last_event_type'), |
| 158 | self.test_dict['event_type']) |
| 159 | self.assertEqual(curr_host_info.GetAttr('last_event_status'), |
| 160 | self.test_dict['event_result']) |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 161 | self.mox.VerifyAll() |
| 162 | |
Don Garrett | 0ad0937 | 2010-12-06 16:20:30 -0800 | [diff] [blame] | 163 | def testChangeUrlPort(self): |
| 164 | r = autoupdate._ChangeUrlPort('http://fuzzy:8080/static', 8085) |
| 165 | self.assertEqual(r, 'http://fuzzy:8085/static') |
| 166 | |
| 167 | r = autoupdate._ChangeUrlPort('http://fuzzy/static', 8085) |
| 168 | self.assertEqual(r, 'http://fuzzy:8085/static') |
| 169 | |
| 170 | r = autoupdate._ChangeUrlPort('ftp://fuzzy/static', 8085) |
| 171 | self.assertEqual(r, 'ftp://fuzzy:8085/static') |
| 172 | |
| 173 | r = autoupdate._ChangeUrlPort('ftp://fuzzy', 8085) |
| 174 | self.assertEqual(r, 'ftp://fuzzy:8085') |
| 175 | |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 176 | def testHandleHostInfoPing(self): |
| 177 | au_mock = self._DummyAutoupdateConstructor() |
| 178 | self.assertRaises(AssertionError, au_mock.HandleHostInfoPing, None) |
| 179 | |
Gilad Arnold | 286a006 | 2012-01-12 13:47:02 -0800 | [diff] [blame] | 180 | # Setup fake host_infos entry and ensure it comes back to us in one piece. |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 181 | test_ip = '1.2.3.4' |
Gilad Arnold | 286a006 | 2012-01-12 13:47:02 -0800 | [diff] [blame] | 182 | au_mock.host_infos.GetInitHostInfo(test_ip).attrs = self.test_dict |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 183 | self.assertEqual( |
| 184 | json.loads(au_mock.HandleHostInfoPing(test_ip)), self.test_dict) |
| 185 | |
| 186 | def testHandleSetUpdatePing(self): |
| 187 | au_mock = self._DummyAutoupdateConstructor() |
| 188 | test_ip = '1.2.3.4' |
| 189 | test_label = 'test/old-update' |
| 190 | self.assertRaises( |
| 191 | AssertionError, au_mock.HandleSetUpdatePing, test_ip, None) |
| 192 | self.assertRaises( |
| 193 | AssertionError, au_mock.HandleSetUpdatePing, None, test_label) |
| 194 | self.assertRaises( |
| 195 | AssertionError, au_mock.HandleSetUpdatePing, None, None) |
| 196 | |
| 197 | au_mock.HandleSetUpdatePing(test_ip, test_label) |
| 198 | self.assertEqual( |
Gilad Arnold | 286a006 | 2012-01-12 13:47:02 -0800 | [diff] [blame] | 199 | au_mock.host_infos.GetHostInfo(test_ip).GetAttr('forced_update_label'), |
| 200 | test_label) |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 201 | |
| 202 | def testHandleUpdatePingWithSetUpdate(self): |
| 203 | self.mox.StubOutWithMock(autoupdate.Autoupdate, 'GenerateLatestUpdateImage') |
| 204 | |
| 205 | test_data = _TEST_REQUEST % self.test_dict |
| 206 | test_label = 'new_update-test/the-new-update' |
| 207 | new_image_dir = os.path.join(self.static_image_dir, test_label) |
| 208 | new_url = self.url.replace('update.gz', test_label + '/update.gz') |
| 209 | |
| 210 | autoupdate.Autoupdate.GenerateLatestUpdateImage( |
| 211 | self.test_board, 'ForcedUpdate', new_image_dir).AndReturn( |
| 212 | 'update.gz') |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 213 | common_util.GetFileSha1(os.path.join( |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 214 | new_image_dir, 'update.gz')).AndReturn(self.hash) |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 215 | common_util.GetFileSha256(os.path.join( |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 216 | new_image_dir, 'update.gz')).AndReturn(self.sha256) |
Gilad Arnold | 55a2a37 | 2012-10-02 09:46:32 -0700 | [diff] [blame] | 217 | common_util.GetFileSize(os.path.join( |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 218 | new_image_dir, 'update.gz')).AndReturn(self.size) |
| 219 | autoupdate.Autoupdate.GetUpdatePayload( |
| 220 | self.hash, self.sha256, self.size, new_url, False).AndReturn( |
| 221 | self.payload) |
| 222 | |
| 223 | self.mox.ReplayAll() |
| 224 | au_mock = self._DummyAutoupdateConstructor() |
| 225 | au_mock.HandleSetUpdatePing('127.0.0.1', test_label) |
| 226 | self.assertEqual( |
Gilad Arnold | 286a006 | 2012-01-12 13:47:02 -0800 | [diff] [blame] | 227 | au_mock.host_infos.GetHostInfo('127.0.0.1'). |
| 228 | GetAttr('forced_update_label'), |
| 229 | test_label) |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 230 | self.assertEqual(au_mock.HandleUpdatePing(test_data), self.payload) |
Gilad Arnold | 286a006 | 2012-01-12 13:47:02 -0800 | [diff] [blame] | 231 | self.assertFalse('forced_update_label' in |
| 232 | au_mock.host_infos.GetHostInfo('127.0.0.1').attrs) |
Dale Curtis | c9aaf3a | 2011-08-09 15:47:40 -0700 | [diff] [blame] | 233 | |
Daniel Erat | 8a0bc4a | 2011-09-30 08:52:52 -0700 | [diff] [blame] | 234 | def testGetVersionFromDir(self): |
| 235 | au = self._DummyAutoupdateConstructor() |
| 236 | |
| 237 | # New-style version number. |
| 238 | self.assertEqual( |
| 239 | au._GetVersionFromDir('/foo/x86-alex/R16-1102.0.2011_09_30_0806-a1'), |
| 240 | '1102.0.2011_09_30_0806') |
| 241 | |
| 242 | # Old-style version number. |
| 243 | self.assertEqual( |
| 244 | au._GetVersionFromDir('/foo/x86-alex/0.15.938.2011_08_23_0941-a1'), |
| 245 | '0.15.938.2011_08_23_0941') |
| 246 | |
| 247 | def testCanUpdate(self): |
| 248 | au = self._DummyAutoupdateConstructor() |
| 249 | |
| 250 | # When both the client and the server have new-style versions, we should |
| 251 | # just compare the tokens directly. |
| 252 | self.assertTrue( |
| 253 | au._CanUpdate('1098.0.2011_09_28_1635', '1098.0.2011_09_30_0806')) |
| 254 | self.assertTrue( |
| 255 | au._CanUpdate('1098.0.2011_09_28_1635', '1100.0.2011_09_26_0000')) |
| 256 | self.assertFalse( |
| 257 | au._CanUpdate('1098.0.2011_09_28_1635', '1098.0.2011_09_26_0000')) |
| 258 | self.assertFalse( |
| 259 | au._CanUpdate('1098.0.2011_09_28_1635', '1096.0.2011_09_30_0000')) |
| 260 | |
| 261 | # When the device has an old four-token version number, we should skip the |
| 262 | # first two tokens and compare the rest. If there's a tie, go with the |
| 263 | # server's version. |
| 264 | self.assertTrue(au._CanUpdate('0.16.892.0', '892.0.1')) |
| 265 | self.assertTrue(au._CanUpdate('0.16.892.0', '892.0.0')) |
| 266 | self.assertFalse(au._CanUpdate('0.16.892.0', '890.0.0')) |
| 267 | |
| 268 | # Test the case where both the client and the server have old-style |
| 269 | # versions. |
| 270 | self.assertTrue(au._CanUpdate('0.16.892.0', '0.16.892.1')) |
| 271 | self.assertFalse(au._CanUpdate('0.16.892.0', '0.16.892.0')) |
| 272 | |
Chris Sosa | 0356d3b | 2010-09-16 15:46:22 -0700 | [diff] [blame] | 273 | |
Gilad Arnold | c65330c | 2012-09-20 15:17:48 -0700 | [diff] [blame] | 274 | if __name__ == '__main__': |
| 275 | unittest.main() |