freezer.tests.unit.utils.test_checksum module¶
- class freezer.tests.unit.utils.test_checksum.TestChecksum(methodName='runTest')¶
Bases:
unittest.case.TestCase
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_compare_dir_match(mock_get_hashes)¶
compute checksum for a directory and it should match
- test_compare_dir_not_match(mock_get_hashes)¶
compute checksum for a directory and it should not match
- test_compare_file_match(mock_get_hashes)¶
compute checksum for a file and it should match
- test_compare_file_not_match(mock_get_hashes)¶
compute checksum for a file and it should not match
- test_compute_dir(mock_hashes)¶
Test hashing a directory
- test_compute_file(mock_get_checksum)¶
Test compute the checksum of a file
- test_get_hash_files(mock_isfile, mock_open)¶
Test calculating the hash of a file
- test_get_hash_multi(mock_isfile)¶
Calculate the hash of files in a directory
- test_hello_world_checksum_md5()¶
Test calculating the md5 of a string
- test_hello_world_checksum_sha256()¶
Test calculating the sha256 of a string
- test_unknown_hasher_type()¶
Test un-known hash algorithm