import yourapp
test_client = yourapp.app.test_client()
response = test_client.get(url_for('whatever.url'), follow_redirects=True)
assert response.request.path == url_for('redirected.url')
Test Redirection In Flask with Python Unittest