diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-05-14 12:23:13 +0100 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-05-14 13:29:37 +0100 |
commit | d4f9f0215874a021fc8a33ade69f1955839559c0 (patch) | |
tree | aa4ad0f9b1f6c4d99e73150d0067407ab36464b0 /morphlib/localartifactcache_tests.py | |
parent | 4d3f31dfd4e865eedbaa26c93fc1efd3afe064e3 (diff) | |
download | morph-d4f9f0215874a021fc8a33ade69f1955839559c0.tar.gz |
Add test for get_source_metadata_filename
Diffstat (limited to 'morphlib/localartifactcache_tests.py')
-rw-r--r-- | morphlib/localartifactcache_tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/morphlib/localartifactcache_tests.py b/morphlib/localartifactcache_tests.py index 18d20612..f400a645 100644 --- a/morphlib/localartifactcache_tests.py +++ b/morphlib/localartifactcache_tests.py @@ -60,6 +60,17 @@ class LocalArtifactCacheTests(unittest.TestCase): expected_name = self.tempfs.getsyspath(self.devel_artifact.basename()) self.assertEqual(filename, expected_name) + def test_get_source_metadata_filename(self): + cache = morphlib.localartifactcache.LocalArtifactCache(self.tempfs) + artifact = self.devel_artifact + name = 'foobar' + + filename = cache.get_source_metadata_filename(artifact.source, + artifact.cache_key, name) + expected_name = self.tempfs.getsyspath('%s.%s' % + (artifact.cache_key, name)) + self.assertEqual(filename, expected_name) + def test_put_artifacts_and_check_whether_the_cache_has_them(self): cache = morphlib.localartifactcache.LocalArtifactCache(self.tempfs) |