1
0

cache_mod.py 408 B

1234567891011121314151617181920
  1. # -*- coding: utf-8 -*-
  2. """
  3. This is a module used in unit.utils.cache to test the context wrapper functions
  4. """
  5. from __future__ import absolute_import
  6. import salt.utils.cache
  7. def __virtual__():
  8. return True
  9. @salt.utils.cache.context_cache
  10. def test_context_module():
  11. if "called" in __context__:
  12. __context__["called"] += 1
  13. else:
  14. __context__["called"] = 0
  15. return __context__