def test_reinject(self):
     variables = generate.get_vars(YAML2)
     generate.reinject(variables)
     self.assertTrue(variables['profiles']['management'], variables)
     self.assertTrue(variables['profiles']['management']['hosts'],
                     variables)
     self.assertEqual(variables['profiles']['management']['min_step'], 1,
                      variables)
 def test_reinject(self):
     variables = generate.get_vars(YAML2)
     generate.reinject(variables)
     self.assertTrue(variables['profiles']['management'], variables)
     self.assertTrue(variables['profiles']['management']['hosts'],
                     variables)
     self.assertEqual(variables['profiles']['management']['min_step'], 1,
                      variables)
 def test_validate2(self):
     variables = generate.get_vars(YAML3)
     self.assertTrue(generate.validate(variables))
 def test_invalid_profile(self):
     variables = generate.get_vars('')
     with self.assertRaises(generate.Invalid):
         generate.validate(variables)
 def test_get_vars(self):
     self.assertEqual(generate.get_vars(YAML1),
                      {'key': 'value'})
 def test_validate2(self):
     variables = generate.get_vars(YAML3)
     self.assertTrue(generate.validate(variables))
 def test_invalid_profile(self):
     variables = generate.get_vars('')
     with self.assertRaises(generate.Invalid):
         generate.validate(variables)
 def test_get_vars(self):
     self.assertEqual(generate.get_vars(YAML1), {'key': 'value'})