diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-08-08 09:58:59 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-08-14 13:28:50 +0000 |
commit | 0710a1529a7af7e33179c71a30d362dd46281d3f (patch) | |
tree | 40c94fa0828536c501db6a1dd4ed85d273674a8e /morphlib/localartifactcache_tests.py | |
parent | 39a0ad8d31d6a39bfa607187b1d76478ccbe2513 (diff) | |
download | morph-0710a1529a7af7e33179c71a30d362dd46281d3f.tar.gz |
unittests: Make the unittests use morphloader
This commit removes all use of morph2 from the unittests, replacing it
with morphloader/morph3. It also converts the test morphologies to YAML.
Diffstat (limited to 'morphlib/localartifactcache_tests.py')
-rw-r--r-- | morphlib/localartifactcache_tests.py | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/morphlib/localartifactcache_tests.py b/morphlib/localartifactcache_tests.py index f400a645..6283c833 100644 --- a/morphlib/localartifactcache_tests.py +++ b/morphlib/localartifactcache_tests.py @@ -27,23 +27,21 @@ class LocalArtifactCacheTests(unittest.TestCase): def setUp(self): self.tempfs = fs.tempfs.TempFS() - morph = morphlib.morph2.Morphology( + loader = morphlib.morphloader.MorphologyLoader() + morph = loader.load_from_string( ''' - { - "name": "chunk", - "kind": "chunk", - "artifacts": { - "chunk-runtime": [ - "usr/bin", - "usr/sbin", - "usr/lib", - "usr/libexec" - ], - "chunk-devel": [ - "usr/include" - ] - } - } + name: chunk + kind: chunk + products: + - artifact: chunk-runtime + include: + - usr/bin + - usr/sbin + - usr/lib + - usr/libexec + - artifact: chunk-devel + include: + - usr/include ''') self.source = morphlib.source.Source( 'repo', 'ref', 'sha1', 'tree', morph, 'chunk.morph') |