From 81451af4468ede41b703f1c0bf4b686ece8d0b03 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 17 Jun 2015 21:04:47 +0000 Subject: sourceresolver_tests: Remove bogus test This test, tests for a case that produces unhelpful results. It asserts that if we don't have the repository locally, and we try to fetch it remotely and the file doesn't exist, that we should have no morphology. What we'd actually like is for it to fetch the repository and try that locally, at which point it would succeed. The reason the flawed previous behaviour (that this test asserted to be correct) failed to cause problems for us, is that in the normal course of resolving refs, we would always either have found it remotely or cached it locally, when we were doing ls_tree or resolve_ref operations. Change-Id: I287eb1e5bc9c916b31f306b4f5f24b0a6d3f0559 --- morphlib/sourceresolver_tests.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/morphlib/sourceresolver_tests.py b/morphlib/sourceresolver_tests.py index 07428496..5985579c 100644 --- a/morphlib/sourceresolver_tests.py +++ b/morphlib/sourceresolver_tests.py @@ -273,15 +273,6 @@ class SourceResolverTests(unittest.TestCase): 'sha1', 'unreached.morph') self.assertEqual(morph, None) - def test_returns_none_when_fails_no_remote_morph(self): - self.lrc.has_repo = self.doesnothaverepo - self.rrc.cat_file = self.noremotefile - morph = self.sr._get_morphology( - {}, None, None, None, - morphlib.morphloader.MorphologyLoader(), 'reponame', - 'sha1', 'unreached.morph') - self.assertEqual(morph, None) - def test_raises_error_when_repo_does_not_exist(self): self.lrc.has_repo = self.doesnothaverepo self.assertRaises(MorphologyNotFoundError, -- cgit v1.2.1