Add initial tests and fix api_key creation signal