Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: mojo/tools/testing/mojom_fetcher/repository_tests.py

Issue 1062293002: Update out-of-date references to fake_repository.py (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/tools/testing/mojom_fetcher/mojom_fetcher_tests.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium 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 import io 5 import io
6 import os.path 6 import os.path
7 import unittest 7 import unittest
8 8
9 from fetcher.dependency import Dependency 9 from fetcher.dependency import Dependency
10 10
11 # Fake repository for testing 11 # Fake repository for testing
12 from fake_repository import FakeRepository 12 from fakes import FakeRepository
13 13
14 14
15 class TestRepository(unittest.TestCase): 15 class TestRepository(unittest.TestCase):
16 def test_init(self): 16 def test_init(self):
17 repository = FakeRepository("/path/to/repo", "third_party/external") 17 repository = FakeRepository("/path/to/repo", "third_party/external")
18 self.assertEqual("/path/to/repo", repository.get_repo_root_directory()) 18 self.assertEqual("/path/to/repo", repository.get_repo_root_directory())
19 self.assertEqual("/path/to/repo/third_party/external", 19 self.assertEqual("/path/to/repo/third_party/external",
20 repository.get_external_directory()) 20 repository.get_external_directory())
21 21
22 def test_get_missing_dependencies(self): 22 def test_get_missing_dependencies(self):
(...skipping 11 matching lines...) Expand all
34 self.assertEquals([Dependency(repository, 34 self.assertEquals([Dependency(repository,
35 "/path/to/repo/third_party/external/services.domokit.org/foo/fiz.mojom", 35 "/path/to/repo/third_party/external/services.domokit.org/foo/fiz.mojom",
36 "services.fiz.org/foo/bar.mojom")], missing_deps) 36 "services.fiz.org/foo/bar.mojom")], missing_deps)
37 37
38 def test_get_external_urls(self): 38 def test_get_external_urls(self):
39 repository = FakeRepository("/path/to/repo", "third_party/external") 39 repository = FakeRepository("/path/to/repo", "third_party/external")
40 urls = repository.get_external_urls() 40 urls = repository.get_external_urls()
41 self.assertEquals(["/path/to/repo/third_party/external"], 41 self.assertEquals(["/path/to/repo/third_party/external"],
42 repository.directories_walked) 42 repository.directories_walked)
43 self.assertEquals(["services.domokit.org/foo/fiz.mojom"], urls) 43 self.assertEquals(["services.domokit.org/foo/fiz.mojom"], urls)
OLDNEW
« no previous file with comments | « mojo/tools/testing/mojom_fetcher/mojom_fetcher_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698