| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 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 import unittest | 6 import unittest |
| 7 | 7 |
| 8 from path_canonicalizer import PathCanonicalizer | 8 from path_canonicalizer import PathCanonicalizer |
| 9 from server_instance import ServerInstance | 9 from server_instance import ServerInstance |
| 10 import svn_constants | 10 |
| 11 | 11 |
| 12 class PathCanonicalizerTest(unittest.TestCase): | 12 class PathCanonicalizerTest(unittest.TestCase): |
| 13 def setUp(self): | 13 def setUp(self): |
| 14 self._server_instance = ServerInstance.ForLocal() | 14 self._server_instance = ServerInstance.ForLocal() |
| 15 | 15 |
| 16 def _Cze(self, path): | 16 def _Cze(self, path): |
| 17 return self._server_instance.path_canonicalizer.Canonicalize(path) | 17 return self._server_instance.path_canonicalizer.Canonicalize(path) |
| 18 | 18 |
| 19 def testSpecifyCorrectly(self): | 19 def testSpecifyCorrectly(self): |
| 20 self._AssertIdentity('extensions/browserAction.html') | 20 self._AssertIdentity('extensions/browserAction.html') |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 self.assertEqual(to, result.path) | 77 self.assertEqual(to, result.path) |
| 78 self.assertFalse(result.permanent) | 78 self.assertFalse(result.permanent) |
| 79 | 79 |
| 80 def _AssertPermanentRedirect(self, to, from_): | 80 def _AssertPermanentRedirect(self, to, from_): |
| 81 result = self._Cze(from_) | 81 result = self._Cze(from_) |
| 82 self.assertEqual(to, result.path) | 82 self.assertEqual(to, result.path) |
| 83 self.assertTrue(result.permanent) | 83 self.assertTrue(result.permanent) |
| 84 | 84 |
| 85 if __name__ == '__main__': | 85 if __name__ == '__main__': |
| 86 unittest.main() | 86 unittest.main() |
| OLD | NEW |