diff options
author | Dan Firth <dan.firth@codethink.co.uk> | 2013-09-27 09:51:31 +0000 |
---|---|---|
committer | Dan Firth <dan.firth@codethink.co.uk> | 2013-09-27 11:15:48 +0000 |
commit | 1bc8aa188896fc7668427f19a4ffd89ca5f6fa3c (patch) | |
tree | a9cbd2149e9b4b3d10f605367e3a96760972cde1 /morphlib/morph2_tests.py | |
parent | 3d93d272079b602aefe5d3bcd660d4a3307f3aad (diff) | |
download | morph-1bc8aa188896fc7668427f19a4ffd89ca5f6fa3c.tar.gz |
Dropped support for 'disk-size' from system morphology files'
Diffstat (limited to 'morphlib/morph2_tests.py')
-rw-r--r-- | morphlib/morph2_tests.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/morphlib/morph2_tests.py b/morphlib/morph2_tests.py index bf32d3c2..c11d7058 100644 --- a/morphlib/morph2_tests.py +++ b/morphlib/morph2_tests.py @@ -96,29 +96,16 @@ class MorphologyTests(unittest.TestCase): self.assertEqual(m['chunks'][0]['morph'], 'le-chunk') self.assertEqual(m['chunks'][0]['build-depends'], None) - def test_parses_system_disk_size(self): - m = Morphology(''' - { - "name": "foo", - "kind": "system", - "disk-size": "1g" - } - ''') - - self.assertEqual(m['disk-size'], 1024 ** 3) - def test_returns_dict_keys(self): m = Morphology(''' { "name": "foo", "kind": "system", - "disk-size": "1g" } ''') self.assertTrue('name' in m.keys()) self.assertTrue('kind' in m.keys()) - self.assertTrue('disk-size' in m.keys()) def test_system_indexes_strata(self): m = Morphology(''' @@ -307,32 +294,10 @@ class MorphologyTests(unittest.TestCase): system_text = '''{ "kind": "system", - "disk-size": "1g", "arch": "x86_64", "system-kind": "rootfs-tarball" }''' - def test_writing_preserves_disk_size(self): - text_lines = self.system_text.splitlines() - morphology = Morphology(self.system_text) - - output = StringIO.StringIO() - morphology.update_text(self.system_text, output) - output_lines = output.getvalue().splitlines() - self.assertEqual(text_lines, output_lines) - - def test_writing_updates_disk_size(self): - text_lines = self.system_text.splitlines() - text_lines[2] = ' "disk-size": 512,' - - morphology = Morphology(self.system_text) - morphology._dict['disk-size'] = 512 - - output = StringIO.StringIO() - morphology.update_text(self.system_text, output) - output_lines = output.getvalue().splitlines() - self.assertEqual(text_lines, output_lines) - def test_nested_dict(self): # Real morphologies don't trigger this code path, so we test manually original_dict = { |