test_manage.py 646 B

12345678910111213141516171819
  1. from salt.runners import manage
  2. from tests.support.unit import TestCase
  3. class ManageTest(TestCase):
  4. def test_deprecation_58638(self):
  5. # check that type error will be raised
  6. self.assertRaises(TypeError, manage.list_state, show_ipv4="data")
  7. # check that show_ipv4 will raise an error
  8. try:
  9. manage.list_state( # pylint: disable=unexpected-keyword-arg
  10. show_ipv4="data"
  11. )
  12. except TypeError as no_show_ipv4:
  13. self.assertEqual(
  14. str(no_show_ipv4),
  15. "list_state() got an unexpected keyword argument 'show_ipv4'",
  16. )