diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-12 16:59:58 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-12-12 16:59:58 +0000 |
commit | 410c58c37931f17fd68c1a6fafa192b56ae3e978 (patch) | |
tree | 9bdd8e12bc3e2c29753cdf3977a5f4af61ced3a4 | |
parent | c79dced23c76eb18a03a2ca0daff63426da07e08 (diff) | |
download | morph-410c58c37931f17fd68c1a6fafa192b56ae3e978.tar.gz |
add test_stories attribute to Morphology
-rw-r--r-- | morphlib/morphology.py | 4 | ||||
-rw-r--r-- | morphlib/morphology_tests.py | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/morphlib/morphology.py b/morphlib/morphology.py index e8af7747..0dcb03f7 100644 --- a/morphlib/morphology.py +++ b/morphlib/morphology.py @@ -98,6 +98,10 @@ class Morphology(object): def disk_size(self): return self._dict['disk-size'] + @property + def test_stories(self): + return self._dict.get('test-stories', []) + def _join_with_baseurl(self, url): is_relative = (':' not in url or '/' not in url or diff --git a/morphlib/morphology_tests.py b/morphlib/morphology_tests.py index 9a8517e1..0119ebc6 100644 --- a/morphlib/morphology_tests.py +++ b/morphlib/morphology_tests.py @@ -129,11 +129,16 @@ class MorphologyTests(unittest.TestCase): "strata": [ "foo", "bar" + ], + "test-stories": [ + "test-1", + "test-2" ] }''')) self.assertEqual(morph.kind, 'system') self.assertEqual(morph.disk_size, '1G') self.assertEqual(morph.strata, ['foo', 'bar']) + self.assertEqual(morph.test_stories, ['test-1', 'test-2']) class StratumRepoTests(unittest.TestCase): |