From d185407ac4caf5648ef4c12eab83fec81c307407 Mon Sep 17 00:00:00 2001 From: Matt Wright Date: Tue, 6 May 2014 13:14:14 -0400 Subject: [PATCH] Add mock X-Forwarded-For header in trackable tests --- tests/test_trackable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_trackable.py b/tests/test_trackable.py index d47f7d3..1e08662 100644 --- a/tests/test_trackable.py +++ b/tests/test_trackable.py @@ -17,12 +17,12 @@ def test_trackable_flag(app, client): e = 'matt@lp.com' authenticate(client, email=e) logout(client) - authenticate(client, email=e) + authenticate(client, email=e, 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 == 'untrackable' - assert user.current_login_ip == 'untrackable' + assert user.current_login_ip == '127.0.0.1' assert user.login_count == 2