-
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.
Co-authored-by: Zacharias Zacharodimos <[email protected]>
- Loading branch information
Showing
11 changed files
with
58 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,6 +147,7 @@ def base_app(request): | |
SQLALCHEMY_TRACK_MODIFICATIONS=False, | ||
SECURITY_PASSWORD_HASH='plaintext', | ||
SECURITY_PASSWORD_SCHEMES=['plaintext'], | ||
SECURITY_PASSWORD_SINGLE_HASH=None, | ||
APP_ALLOWED_HOSTS=['localhost'], | ||
APP_THEME=['semantic-ui'], | ||
THEME_ICONS={ | ||
|
@@ -488,10 +489,12 @@ def user(app_with_userprofiles): | |
"""Create users.""" | ||
with db.session.begin_nested(): | ||
datastore = app_with_userprofiles.extensions['security'].datastore | ||
user1 = datastore.create_user(email='[email protected]', | ||
password='tester', active=True) | ||
profile = UserProfile(username='mynick', user=user1) | ||
db.session.add(profile) | ||
user1 = datastore.create_user( | ||
email='[email protected]', | ||
password='tester', | ||
active=True, | ||
username='mynick', | ||
) | ||
db.session.commit() | ||
return user1 | ||
|
||
|
@@ -501,10 +504,12 @@ def user_rest(app_rest_with_userprofiles): | |
"""Create users.""" | ||
with db.session.begin_nested(): | ||
datastore = app_rest_with_userprofiles.extensions['security'].datastore | ||
user1 = datastore.create_user(email='[email protected]', | ||
password='tester', active=True) | ||
profile = UserProfile(username='mynick', user=user1) | ||
db.session.add(profile) | ||
user1 = datastore.create_user( | ||
email='[email protected]', | ||
password='tester', | ||
active=True, | ||
username='mynick', | ||
) | ||
db.session.commit() | ||
return user1 | ||
|
||
|
@@ -515,8 +520,7 @@ def form_test_data(): | |
return dict( | ||
email='[email protected]', | ||
profile=dict( | ||
full_name='Test Tester', | ||
username='test123', | ||
full_name='Test Tester', username='test123', | ||
), | ||
) | ||
|
||
|
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 |
---|---|---|
|
@@ -228,9 +228,7 @@ def test_patch_dictionary(): | |
"""Test the dictionary patch function.""" | ||
orig_dict = { | ||
"email": "[email protected]", | ||
"profile": { | ||
"username": "user" | ||
}, | ||
"username": "user", | ||
} | ||
|
||
# patch some existing properties, add new ones, and leave some as is | ||
|
@@ -244,8 +242,8 @@ def test_patch_dictionary(): | |
|
||
expected = { | ||
"email": "[email protected]", | ||
"username": "user", | ||
"profile": { | ||
"username": "user", | ||
"full_name": "Test User", | ||
}, | ||
"extra": [1, 2, 3], | ||
|