Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Add mock X-Forwarded-For header in trackable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Wright committed May 6, 2014
1 parent 58b7fa8 commit d185407
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_trackable.py
Expand Up @@ -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

0 comments on commit d185407

Please sign in to comment.