OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Unit tests for gcl.py.""" | 6 """Unit tests for gcl.py.""" |
7 | 7 |
8 # pylint: disable=E1103,E1101,E1120 | 8 # pylint: disable=E1103,E1101,E1120 |
9 | 9 |
10 import os | 10 import os |
11 import sys | 11 import sys |
12 | 12 |
13 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | 13 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
14 | 14 |
15 from super_mox import mox, SuperMoxTestBase | 15 from testing_support.super_mox import mox, SuperMoxTestBase |
16 | 16 |
17 import gcl | 17 import gcl |
18 import presubmit_support | 18 import presubmit_support |
19 | 19 |
20 | 20 |
21 class GclTestsBase(SuperMoxTestBase): | 21 class GclTestsBase(SuperMoxTestBase): |
22 """Setups and tear downs the mocks but doesn't test anything as-is.""" | 22 """Setups and tear downs the mocks but doesn't test anything as-is.""" |
23 def setUp(self): | 23 def setUp(self): |
24 SuperMoxTestBase.setUp(self) | 24 SuperMoxTestBase.setUp(self) |
25 self.fake_root_dir = self.RootDir() | 25 self.fake_root_dir = self.RootDir() |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 self.assertEquals(change_info.description, | 587 self.assertEquals(change_info.description, |
588 'deescription\n\nCommitted: http://view/12345') | 588 'deescription\n\nCommitted: http://view/12345') |
589 # pylint: disable=W0212 | 589 # pylint: disable=W0212 |
590 self.assertTrue(change_info._deleted) | 590 self.assertTrue(change_info._deleted) |
591 self.assertTrue(change_info._closed) | 591 self.assertTrue(change_info._closed) |
592 | 592 |
593 | 593 |
594 if __name__ == '__main__': | 594 if __name__ == '__main__': |
595 import unittest | 595 import unittest |
596 unittest.main() | 596 unittest.main() |
OLD | NEW |