__init__.py 454 B

12345678910111213141516
  1. # -*- coding: utf-8 -*-
  2. '''
  3. Some utils functions to be used throughout the integration test files.
  4. '''
  5. def decode_byte_list(byte_list):
  6. '''
  7. Helper function that takes a list of byte strings and decodes each item
  8. according to the __salt_system_encoding__ value. Returns a list of strings.
  9. '''
  10. decoded_items = []
  11. for item in byte_list:
  12. decoded_items.append(item.decode(__salt_system_encoding__))
  13. return decoded_items