-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logging: add user information to sentry
* Closes: #2734. Co-Authored-by: Peter Weber <[email protected]>
- Loading branch information
Showing
7 changed files
with
75 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,19 +47,38 @@ def user_with_profile(db, default_user_password): | |
|
||
|
||
@pytest.fixture(scope="function") | ||
def user_without_email(db, default_user_password): | ||
def user_without_name_email(db, default_user_password): | ||
"""Create a simple invenio user without email.""" | ||
with db.session.begin_nested(): | ||
profile = dict( | ||
birth_date="1990-01-01", | ||
first_name="User", | ||
last_name="With Profile", | ||
city="Nowhere", | ||
) | ||
user = User( | ||
password=hash_password(default_user_password), | ||
user_profile=profile, | ||
username="user_without_email", | ||
username="user_without_name_email", | ||
active=True, | ||
) | ||
db.session.add(user) | ||
db.session.commit() | ||
user.password_plaintext = default_user_password | ||
return user | ||
|
||
|
||
@pytest.fixture(scope="function") | ||
def user_without_name(db, default_user_password): | ||
"""Create a simple invenio user without nmae.""" | ||
with db.session.begin_nested(): | ||
profile = dict( | ||
birth_date="1990-01-01", | ||
city="Nowhere", | ||
) | ||
user = User( | ||
password=hash_password(default_user_password), | ||
user_profile=profile, | ||
username="user_without_name", | ||
email="[email protected]", | ||
active=True, | ||
) | ||
db.session.add(user) | ||
|
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