1
0

test_custom.py 629 B

1234567891011121314151617181920212223242526
  1. # -*- coding: utf-8 -*-
  2. """
  3. Test the core grains
  4. """
  5. from __future__ import absolute_import, unicode_literals
  6. import pytest
  7. from tests.support.case import ModuleCase
  8. from tests.support.helpers import slowTest
  9. @pytest.mark.windows_whitelisted
  10. class TestGrainsCore(ModuleCase):
  11. """
  12. Test the core grains grains
  13. """
  14. @slowTest
  15. def test_grains_passed_to_custom_grain(self):
  16. """
  17. test if current grains are passed to grains module functions that have a grains argument
  18. """
  19. self.assertEqual(
  20. self.run_function("grains.get", ["custom_grain_test"]), "itworked"
  21. )