-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
global: fix tests from pallets family upgrade
- Loading branch information
Pablo Panero
committed
May 16, 2022
1 parent
55a5880
commit 64ead48
Showing
11 changed files
with
22 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,8 +76,7 @@ def test_authorized_signup_valid_user(app, example_globus): | |
remote_app='globus', code='test', | ||
state=_get_state())) | ||
assert resp.status_code == 302 | ||
assert resp.location == ('http://localhost/account/settings/' + | ||
'linkedaccounts/') | ||
assert resp.location == '/account/settings/linkedaccounts/' | ||
|
||
# Assert database state (Sign-up complete) | ||
user = User.query.filter_by(email='[email protected]').one() | ||
|
@@ -120,10 +119,7 @@ def test_authorized_signup_valid_user(app, example_globus): | |
remote_app='globus', code='test', | ||
state=_get_state())) | ||
assert resp.status_code == 302 | ||
assert resp.location == ( | ||
'http://localhost/' + | ||
'account/settings/linkedaccounts/' | ||
) | ||
assert resp.location == '/account/settings/linkedaccounts/' | ||
|
||
# check that exist only one account | ||
user = User.query.filter_by(email='[email protected]').one() | ||
|
@@ -140,9 +136,7 @@ def test_authorized_reject(app): | |
error_description='User denied access', | ||
state=_get_state())) | ||
assert resp.status_code in (301, 302) | ||
assert resp.location == ( | ||
'http://localhost/' | ||
) | ||
assert resp.location == '/' | ||
# Check message flash | ||
assert session['_flashes'][0][0] == 'info' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,7 +202,6 @@ def mock_response_handler(remote, url, payload): | |
# Initialize InvenioOAuth | ||
FlaskOAuth(app_rest) | ||
InvenioOAuthClientREST(app_rest) | ||
app_rest.register_blueprint(rest_blueprint) | ||
|
||
# Try to sign-up client | ||
response = app_rest.test_client().get( | ||
|
@@ -222,7 +221,6 @@ def test_response_handler_with_postmessage(remote, app_rest, models_fixture): | |
# Initialize InvenioOAuth | ||
FlaskOAuth(app_rest) | ||
InvenioOAuthClientREST(app_rest) | ||
app_rest.register_blueprint(rest_blueprint) | ||
|
||
datastore = app_rest.extensions['invenio-accounts'].datastore | ||
existing_email = '[email protected]' | ||
|