diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-09-23 16:23:49 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-09-24 10:34:27 +0000 |
commit | e59d4347f511412e2162d97eca3fc65bf1c3b978 (patch) | |
tree | 452a31af4578099e4540f68218c69d684e55040d /morphlib/morphset_tests.py | |
parent | e664f2000e233c1f05657e7e2dd85e8a182deb0e (diff) | |
download | morph-e59d4347f511412e2162d97eca3fc65bf1c3b978.tar.gz |
MorphSet: Add method for changing refs en-masse
This is used to change all the refs of the morphologies in the root
repository to point to the system branch instead.
Diffstat (limited to 'morphlib/morphset_tests.py')
-rw-r--r-- | morphlib/morphset_tests.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/morphlib/morphset_tests.py b/morphlib/morphset_tests.py index baa3e103..fa8fa030 100644 --- a/morphlib/morphset_tests.py +++ b/morphlib/morphset_tests.py @@ -192,6 +192,20 @@ class MorphologySetTests(unittest.TestCase): [('test:foo-chunk', 'master'), ('test:morphs', 'master')]) + def test_repoint_refs(self): + self.morphs.add_morphology(self.system) + self.morphs.add_morphology(self.stratum) + self.morphs.repoint_refs('test:morphs', 'test') + self.assertEqual(self.system['strata'], + [ + { + 'morph': 'foo-stratum', + 'ref': 'test', + 'repo': 'test:morphs', + 'unpetrify-ref': 'master', + } + ]) + def test_petrify_chunks(self): # TODO: test petrifying a larger morphset self.morphs.add_morphology(self.system) |