You need to specify constant
constant
so that you get the return value of a call
:
function get_from_map(uint _key) constant returns (address)
.
Without constant, test.get_from_map(1)
is a sendTransaction
which always returns a transaction hash. See What is the difference between a transaction and a call?What is the difference between a transaction and a call?