def test_sha256_text(self, mock_hashlib): """Test ShardManager._sha256""" test_data = 'ab' output = ShardManager._ripemd160(test_data) mock_hashlib.new.assert_called_with('ripemd160', test_data) mock_hashlib.new.return_value.digest.assert_called_once_with()
def test_sha256_text(self, mock_hashlib): """Test ShardManager._sha256""" test_data = 'ab' output = ShardManager._ripemd160(test_data) mock_hashlib.new.assert_called_with('ripemd160', test_data) mock_hashlib.new.return_value.digest.assert_called_once_with()
def test_ripemd160_binary(self, mock_hashlib): """Test ShardManager._ripemd160""" test_data = b'ab' output = ShardManager._ripemd160(test_data) assert output is not None mock_hashlib.new.assert_called_with('ripemd160', test_data) mock_hashlib.new.return_value.digest.assert_called_once_with()
def test_ripemd160_binary(self, mock_hashlib): """Test ShardManager._ripemd160""" test_data = b'ab' output = ShardManager._ripemd160(test_data) assert output is not None mock_hashlib.new.assert_called_with('ripemd160', test_data) mock_hashlib.new.return_value.digest.assert_called_once_with()