test_rabbitmq.py 704 B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, print_function, unicode_literals
  3. import pytest
  4. from tests.support.case import ModuleCase
  5. from tests.support.helpers import requires_salt_modules, skip_if_not_root
  6. @skip_if_not_root
  7. @requires_salt_modules("rabbitmq")
  8. @pytest.mark.windows_whitelisted
  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)