Beispiel #1
0
    def _blueprint_to_ks(blueprint_data):
        recipe_obj = recipes.recipe_from_toml(blueprint_data)
        ks = KickstartParser(makeVersion())

        # write out the customization data, and parse the resulting kickstart
        with tempfile.NamedTemporaryFile(prefix="lorax.test.customizations",
                                         mode="w") as f:
            add_customizations(f, recipe_obj)
            f.flush()
            ks.readKickstart(f.name)

        return ks
Beispiel #2
0
 def test_create_user_all(self):
     """Test creating user with all settings"""
     r = recipe_from_toml(USER_ALL)
     f = StringIO()
     add_customizations(f, r)
     self.assertEqual(KS_USER_ALL, f.getvalue())
Beispiel #3
0
 def assertNotCustomization(self, test, result):
     r = recipe_from_toml(test)
     f = StringIO()
     add_customizations(f, r)
     self.assertTrue(result not in f.getvalue(), f.getvalue())