human
I wrote the below code

    app.wsgi_app = ProxyFix(app.wsgi_app, num_proxies=1)
    @app.route('/login_custom', methods=['POST'])
    def login_custom():
        user = app.security.datastore.find_user(email=e)
        login_user(user)
        @after_this_request
        def save_user(response):
            app.security.datastore.commit()
            return response
        return redirect('/')
    e = 'matt@lp.com'
    authenticate(client, email=e)
    logout(client)
    data = dict(email=e, password='password', remember='y')
    client.post('/login_custom', data=data, headers={'X-Forwarded-For': '127.0.0.1'})
    with app.app_context():
        user = app.security.datastore.find_user(email=e)
        assert (user.last_login_at is not None)
        assert (user.current_login_at is not None)
        assert (user.last_login_ip == _client_ip(client))
        assert (user.current_login_ip == '127.0.0.1')
        assert (user.login_count == 2)

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def test_trackable_using_login_user(app, client):