Implement a set_cookie method in TestApp.