1
0

test_rabbitmq.py 704 B

123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. # Import python libs
  3. from __future__ import absolute_import, unicode_literals, print_function
  4. # Import Salt Testing libs
  5. from tests.support.case import ModuleCase
  6. from tests.support.helpers import requires_salt_modules, skip_if_not_root
  7. @skip_if_not_root
  8. @requires_salt_modules('rabbitmq')
  9. class RabbitModuleTest(ModuleCase):
  10. '''
  11. Validates the rabbitmqctl functions.
  12. To run these tests, you will need to be able to access the rabbitmqctl
  13. commands.
  14. '''
  15. def test_user_exists(self):
  16. '''
  17. Find out whether a user exists.
  18. '''
  19. ret = self.run_function('rabbitmq.user_exists', ['null_user'])
  20. self.assertEqual(ret, False)