-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add para make_new_user_if_none:boolean defaults to True is added to if user is None add test for make_new_user_if_none=False in tests.read.test_get_user_by_email Signed-off-by: Rudolf Braun <[email protected]>
- Loading branch information
1 parent
a34c447
commit d9256c3
Showing
2 changed files
with
10 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,10 @@ def test_get_user_by_email_with_users(self, db_session): | |
user = get_user_by_email(session=db_session, email="[email protected]") | ||
assert user.email == "[email protected]" | ||
assert len(db_session.query(UserSQL).all()) == 2 | ||
|
||
def test_get_user_by_email_no_user_maker_user_false(self, db_session): | ||
user = get_user_by_email( | ||
session=db_session, email="[email protected]", make_new_user_if_none=False | ||
) | ||
assert user == None | ||
assert len(db_session.query(UserSQL).all()) == 0 |