summaryrefslogtreecommitdiff
path: root/morphlib/sourcepool_tests.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-09-10 09:09:23 +0000
committerRichard Maw <richard.maw@gmail.com>2014-09-19 12:43:26 +0000
commit15d1a32331883c3057fc3965b1f61dbfe0ae478d (patch)
treec53c383b17cfabc0ad82b7b63966261d58bcaec6 /morphlib/sourcepool_tests.py
parent30bd3185050bc7997a032ca32f0a5ac9b5e76ed9 (diff)
downloadmorph-15d1a32331883c3057fc3965b1f61dbfe0ae478d.tar.gz
FIXUP: Fix up unit tests from change allowing multiple sources
This is logically part of the previous patch, but has been split out to ease reviewing.
Diffstat (limited to 'morphlib/sourcepool_tests.py')
-rw-r--r--morphlib/sourcepool_tests.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/morphlib/sourcepool_tests.py b/morphlib/sourcepool_tests.py
index 95264140..f3740049 100644
--- a/morphlib/sourcepool_tests.py
+++ b/morphlib/sourcepool_tests.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012 Codethink Limited
+# Copyright (C) 2012-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@ import morphlib
class DummySource(object):
def __init__(self):
+ self.name = 'dummy'
self.repo_name = 'repo'
self.original_ref = 'original/ref'
self.sha1 = 'dummy.sha1'
@@ -50,14 +51,7 @@ class SourcePoolTests(unittest.TestCase):
result = self.pool.lookup(self.source.repo_name,
self.source.original_ref,
self.source.filename)
- self.assertEqual(result, self.source)
-
- def test_lookup_raises_keyerror_if_not_found(self):
- self.assertRaises(KeyError,
- self.pool.lookup,
- self.source.repo_name,
- self.source.original_ref,
- self.source.filename)
+ self.assertEqual(result, [self.source])
def test_iterates_in_add_order(self):
sources = []