OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The LUCI Authors. All rights reserved. | 2 # Copyright 2015 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 import copy | 6 import copy |
7 import doctest | 7 import doctest |
8 import os | 8 import os |
9 import subprocess | 9 import subprocess |
10 import unittest | 10 import unittest |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 377 |
378 | 378 |
379 class TestPackageSpec(MockIOThings, unittest.TestCase): | 379 class TestPackageSpec(MockIOThings, unittest.TestCase): |
380 def setUp(self): | 380 def setUp(self): |
381 super(TestPackageSpec, self).setUp() | 381 super(TestPackageSpec, self).setUp() |
382 | 382 |
383 self.proto_text = """ | 383 self.proto_text = """ |
384 api_version: 1 | 384 api_version: 1 |
385 project_id: "super_main_package" | 385 project_id: "super_main_package" |
386 recipes_path: "path/to/recipes" | 386 recipes_path: "path/to/recipes" |
| 387 canonical_base_url: "https://bobbie.example.com" |
387 deps { | 388 deps { |
388 project_id: "bar" | 389 project_id: "bar" |
389 url: "https://repo.com/bar.git" | 390 url: "https://repo.com/bar.git" |
390 branch: "superbar" | 391 branch: "superbar" |
391 revision: "deadd00d" | 392 revision: "deadd00d" |
392 } | 393 } |
393 deps { | 394 deps { |
394 project_id: "foo" | 395 project_id: "foo" |
395 url: "https://repo.com/foo.git" | 396 url: "https://repo.com/foo.git" |
396 branch: "master" | 397 branch: "master" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 self.assertFalse(checkout.called) | 471 self.assertFalse(checkout.called) |
471 | 472 |
472 | 473 |
473 def load_tests(_loader, tests, _ignore): | 474 def load_tests(_loader, tests, _ignore): |
474 tests.addTests(doctest.DocTestSuite(package)) | 475 tests.addTests(doctest.DocTestSuite(package)) |
475 return tests | 476 return tests |
476 | 477 |
477 | 478 |
478 if __name__ == '__main__': | 479 if __name__ == '__main__': |
479 result = unittest.main() | 480 result = unittest.main() |
OLD | NEW |