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/artifact_tests.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'morphlib/artifact_tests.py') diff --git a/morphlib/artifact_tests.py b/morphlib/artifact_tests.py index 75dfd870..3b817823 100644 --- a/morphlib/artifact_tests.py +++ b/morphlib/artifact_tests.py @@ -39,13 +39,16 @@ class ArtifactTests(unittest.TestCase): include: - usr/include ''') - self.source = morphlib.source.Source( - 'repo', 'ref', 'sha1', 'tree', morph, 'chunk.morph') + self.source, = morphlib.source.make_sources('repo', 'ref', + 'chunk.morph', 'sha1', + 'tree', morph) self.artifact_name = 'chunk-runtime' - self.artifact = morphlib.artifact.Artifact( - self.source, self.artifact_name) - self.other = morphlib.artifact.Artifact( - self.source, self.artifact_name) + self.artifact = self.source.artifacts[self.artifact_name] + self.other_source, = morphlib.source.make_sources('repo', 'ref', + 'chunk.morph', + 'sha1', 'tree', + morph) + self.other = self.other_source.artifacts[self.artifact_name] def test_constructor_sets_source(self): self.assertEqual(self.artifact.source, self.source) -- cgit v1.2.1