diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-06-07 12:00:30 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-06-07 12:00:30 +0100 |
commit | 4d7bb9e464454e1dd91c7f81868e7673244bc1f6 (patch) | |
tree | fa8d1f861fc23433591e23ea71b1ba0dc41bad90 | |
parent | b088e31b740c62b90ddf9c3342b876736790c1e8 (diff) | |
download | morph-4d7bb9e464454e1dd91c7f81868e7673244bc1f6.tar.gz |
Fix unit tests to raise cliapp.AppException the right way
-rw-r--r-- | morphlib/cachedrepo_tests.py | 10 | ||||
-rw-r--r-- | morphlib/localrepocache_tests.py | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/morphlib/cachedrepo_tests.py b/morphlib/cachedrepo_tests.py index 0baeba26..b60038e4 100644 --- a/morphlib/cachedrepo_tests.py +++ b/morphlib/cachedrepo_tests.py @@ -38,7 +38,7 @@ class CachedRepoTests(unittest.TestCase): try: return output[ref] except: - raise cliapp.AppException('git show-ref %s' % ref, '') + raise cliapp.AppException('git show-ref %s' % ref) def rev_list(self, ref): output = { @@ -50,7 +50,7 @@ class CachedRepoTests(unittest.TestCase): try: return output[ref] except: - raise cliapp.AppException('git rev-list %s' % ref, '') + raise cliapp.AppException('git rev-list %s' % ref) def cat_file(self, ref, filename): output = { @@ -61,7 +61,7 @@ class CachedRepoTests(unittest.TestCase): return output['%s:%s' % (ref, filename)] except: raise cliapp.AppException( - 'git cat-file blob %s:%s' % (ref, filename), '') + 'git cat-file blob %s:%s' % (ref, filename)) def copy_repository(self, source_dir, target_dir): pass @@ -74,7 +74,7 @@ class CachedRepoTests(unittest.TestCase): if ref in bad_refs: # simulate a git failure or something similar to # trigger a CheckoutError - raise cliapp.AppException('git checkout %s' % ref, '') + raise cliapp.AppException('git checkout %s' % ref) else: with open(os.path.join(target_dir, 'foo.morph'), 'w') as f: f.write('contents of foo.morph') @@ -83,7 +83,7 @@ class CachedRepoTests(unittest.TestCase): pass def update_with_failure(self): - raise cliapp.AppException('git remote update origin', '') + raise cliapp.AppException('git remote update origin') def setUp(self): self.repo_name = 'foo' diff --git a/morphlib/localrepocache_tests.py b/morphlib/localrepocache_tests.py index de894794..29feba07 100644 --- a/morphlib/localrepocache_tests.py +++ b/morphlib/localrepocache_tests.py @@ -108,7 +108,7 @@ class LocalRepoCacheTests(unittest.TestCase): def test_fails_to_cache_when_remote_does_not_exist(self): def fail(args): - raise cliapp.AppException('', '') + raise cliapp.AppException('') self.lrc._git = fail self.assertRaises(morphlib.localrepocache.NoRemote, self.lrc.cache_repo, self.repourl) |