1
0

test_rabbitmq.py 669 B

12345678910111213141516171819202122232425
  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. 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)