1
0

test_rabbitmq.py 702 B

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