From 15d1a32331883c3057fc3965b1f61dbfe0ae478d Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 10 Sep 2014 09:09:23 +0000 Subject: 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. --- morphlib/sourcepool_tests.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'morphlib/sourcepool_tests.py') 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 = [] -- cgit v1.2.1