diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-25 16:19:09 +0100 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-25 17:06:38 +0100 |
commit | 244feb97ef207ba724f080826d6b4ad3a2d7cd33 (patch) | |
tree | bf3e27323c66df6ec5a608c058b7ffbb8dfb405c /morphlib/morphologyfactory_tests.py | |
parent | f1409e9fe46cc68b8ff4f7c9a8fc6d8ecb11225c (diff) | |
download | morph-244feb97ef207ba724f080826d6b4ad3a2d7cd33.tar.gz |
Make morph factory tests expect MorphologyNotFoundError
Diffstat (limited to 'morphlib/morphologyfactory_tests.py')
-rw-r--r-- | morphlib/morphologyfactory_tests.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/morphlib/morphologyfactory_tests.py b/morphlib/morphologyfactory_tests.py index 39092857..47bf3153 100644 --- a/morphlib/morphologyfactory_tests.py +++ b/morphlib/morphologyfactory_tests.py @@ -19,7 +19,7 @@ import unittest import morphlib from morphlib.morph2 import Morphology from morphlib.morphologyfactory import (MorphologyFactory, - AutodetectError, + MorphologyNotFoundError, NotcachedError) from morphlib.remoterepocache import CatFileError @@ -234,16 +234,15 @@ class MorphologyFactoryTests(unittest.TestCase): 'assumed-remote.morph') self.assertEqual('assumed-remote', morph['name']) - def test_raises_error_when_fails_detect_locally(self): + def test_raises_error_when_no_local_morph(self): self.lr.cat = self.nolocalfile - self.assertRaises(AutodetectError, self.mf.get_morphology, + self.assertRaises(MorphologyNotFoundError, self.mf.get_morphology, 'reponame', 'sha1', 'unreached.morph') - def test_raises_error_when_fails_detect_remotely(self): + def test_raises_error_when_fails_no_remote_morph(self): self.lrc.has_repo = self.doesnothaverepo self.rrc.cat_file = self.noremotefile -# self.mf.get_morphology('reponame', 'sha1', 'unreached.morph') - self.assertRaises(AutodetectError, self.mf.get_morphology, + self.assertRaises(MorphologyNotFoundError, self.mf.get_morphology, 'reponame', 'sha1', 'unreached.morph') def test_raises_error_when_name_mismatches(self): |