1
0

test_key.py 851 B

123456789101112131415161718192021222324252627282930
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, print_function, unicode_literals
  3. import re
  4. import pytest
  5. from tests.support.case import ModuleCase
  6. from tests.support.helpers import slowTest
  7. @pytest.mark.windows_whitelisted
  8. class KeyModuleTest(ModuleCase):
  9. @slowTest
  10. def test_key_finger(self):
  11. """
  12. test key.finger to ensure we receive a valid fingerprint
  13. """
  14. out = self.run_function("key.finger")
  15. match = re.match("([0-9a-z]{2}:){15,}[0-9a-z]{2}$", out)
  16. self.assertTrue(match)
  17. @slowTest
  18. def test_key_finger_master(self):
  19. """
  20. test key.finger_master to ensure we receive a valid fingerprint
  21. """
  22. out = self.run_function("key.finger_master")
  23. match = re.match("([0-9a-z]{2}:){15,}[0-9a-z]{2}$", out)
  24. self.assertTrue(match)