freezer/tests/unit/utils
Domhnall Walsh 98c93e68a5 Fix checksum generation so that it handles binary data
At the moment, if freezer attempts to perform a backup with
the consistency check option enabled, it will fail if the
files being backed up contain anything other than plain
ASCII (or at least some flavour of same, ISO-8859-x
etc.). This is because the hashlib module fails as it
expects a string to digest rather than a binary blob.

This should fix matters by escaping everything that might
cause an issue and works for Python 2 and 3. Because it
escapes strings in a different way to before, the
checksums it computes may be different to previously
in some cases, but at least now it should always produce
one.

Change-Id: Idf62dc9e398c396c9de19cbff5622e79d4c7a198
Closes-Bug: #1595732
2016-07-13 10:06:57 +01:00
..
__init__.py Refactoring of code: 2016-03-08 14:20:23 +00:00
test_checksum.py Fix checksum generation so that it handles binary data 2016-07-13 10:06:57 +01:00
test_config.py Fix cStringIO usage 2016-06-25 11:25:38 -06:00
test_exec_cmd.py Refactoring of code: 2016-03-08 14:20:23 +00:00
test_utils.py Adds checksum before backup and after restore for consistency check. 2016-05-25 15:58:40 +00:00
test_validator.py Refactoring of code: 2016-03-08 14:20:23 +00:00
test_winutils.py Refactoring of code: 2016-03-08 14:20:23 +00:00