1
0

test_custom.py 551 B

12345678910111213141516171819202122
  1. # -*- coding: utf-8 -*-
  2. '''
  3. Test the core grains
  4. '''
  5. # Import python libs
  6. from __future__ import absolute_import, unicode_literals
  7. # Import Salt Testing libs
  8. from tests.support.case import ModuleCase
  9. class TestGrainsCore(ModuleCase):
  10. '''
  11. Test the core grains grains
  12. '''
  13. def test_grains_passed_to_custom_grain(self):
  14. '''
  15. test if current grains are passed to grains module functions that have a grains argument
  16. '''
  17. self.assertEqual(self.run_function('grains.get', ['custom_grain_test']), 'itworked')