Bug/tests dont pass

I'm not too happy for the second commit, the fix on the test_send_key. I have the feeling that is not good to have so much knowledge of the implementation hard-coded in the test. But as it was like that I just keep it until I have better ideas about how to improve it.