Esempio n. 1
0
def test_get_hashes_string_all_keys_present():
    test_string = "abcdefghijklmnopqrstuvwxyz"
    expected_keys = {"md5", "sha1", "sha256", "sha512"}

    hashes = set(helper.get_hashes_string(test_string))
    has_all_keys = len(expected_keys.difference(hashes)) == 0

    assert has_all_keys
Esempio n. 2
0
def test_get_hashes_string_not_equal_successful():
    test_string = "abcdefghijklmnopqrstuvwxyz"
    assert {
        "sha1":
        "32d10c7b8cf96570ca04ce37f2a19d84240d3a89",
        "sha256":
        "71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73",
        "sha512":
        "4dbff86cc2ca1bae1e16468a05cb9881c97f1753bce3619034898faa1aabe429955a1bf8ec483d7421fe3c1646613"
        + "a59ed5441fb0f321389f77f48a879c7b1f1"
    } != helper.get_hashes_string(test_string)
Esempio n. 3
0
def test_get_hashes_string_no_exceptions():
    test_string = "abcdefghijklmnopqrstuvwxyz"
    helper.get_hashes_string(test_string)