| Index: appengine/findit/crash/test/changelist_classifier_test.py
|
| diff --git a/appengine/findit/crash/test/changelist_classifier_test.py b/appengine/findit/crash/test/changelist_classifier_test.py
|
| index 40563747e72913025b506dacb30665330a721ee0..e1ca7374e9f7325699f9dd2388925bd063372a0a 100644
|
| --- a/appengine/findit/crash/test/changelist_classifier_test.py
|
| +++ b/appengine/findit/crash/test/changelist_classifier_test.py
|
| @@ -123,8 +123,23 @@ class ChangelistClassifierTest(CrashTestSuite):
|
|
|
| def setUp(self):
|
| super(ChangelistClassifierTest, self).setUp()
|
| +
|
| + repository = GitilesRepository(self.GetMockHttpClient())
|
| +
|
| + # TODO(crbug.com/677224): should replace this with an actual factory.
|
| + def MutateTheRepo(dep_url): # pragma: no cover
|
| + """A factory function for returning ``Repository`` objects.
|
| +
|
| + The current definition captures the functionality of before
|
| + we factored out this factory method. That is, it's not really a
|
| + "factory" but rather mutates the main repo object in place. In
|
| + the future this should be changed to do the right thing instead.
|
| + """
|
| + repository.repo_url = dep_url
|
| + return repository
|
| +
|
| self.changelist_classifier = changelist_classifier.ChangelistClassifier(
|
| - GitilesRepository(self.GetMockHttpClient()), 7)
|
| + repository, MutateTheRepo, 7)
|
|
|
| def testSkipAddedAndDeletedRegressionRolls(self):
|
| self.mock(chrome_dependency_fetcher.ChromeDependencyFetcher,
|
| @@ -313,7 +328,7 @@ class ChangelistClassifierTest(CrashTestSuite):
|
|
|
| suspects = changelist_classifier.FindSuspects(
|
| dep_file_to_changelogs, dep_file_to_stack_infos, stack_deps,
|
| - GitilesRepository(self.GetMockHttpClient()))
|
| + lambda repo_url: GitilesRepository(self.GetMockHttpClient(), repo_url))
|
| self.assertListEqual([suspect.ToDict() for suspect in suspects],
|
| expected_suspects)
|
|
|
|
|