def test_attributes(): assert pysha.digest_size == 20 assert pysha.digestsize == 20 assert pysha.blocksize == 1 assert pysha.new().digest_size == 20 assert pysha.new().digestsize == 20
def check(self, data, digest): computed = pysha.new(data).hexdigest() assert computed == digest