-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kenneth Kehl
committed
Nov 15, 2024
1 parent
5c6a5f9
commit 5f4da49
Showing
4 changed files
with
73 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
import pytest | ||
from flask import current_app | ||
from freezegun import freeze_time | ||
from sqlalchemy import func, select | ||
from sqlalchemy import delete, func, select | ||
|
||
from app import db | ||
from app.dao.service_user_dao import dao_get_service_user, dao_update_service_user | ||
|
@@ -101,7 +101,9 @@ def test_post_user(admin_request, notify_db_session): | |
""" | ||
Tests POST endpoint '/' to create a user. | ||
""" | ||
User.query.delete() | ||
db.session.execute(delete(User)) | ||
db.session.commit() | ||
|
||
data = { | ||
"name": "Test User", | ||
"email_address": "[email protected]", | ||
|
@@ -129,7 +131,9 @@ def test_post_user(admin_request, notify_db_session): | |
|
||
|
||
def test_post_user_without_auth_type(admin_request, notify_db_session): | ||
User.query.delete() | ||
|
||
db.session.execute(delete(User)) | ||
db.session.commit() | ||
data = { | ||
"name": "Test User", | ||
"email_address": "[email protected]", | ||
|
@@ -155,7 +159,9 @@ def test_post_user_missing_attribute_email(admin_request, notify_db_session): | |
""" | ||
Tests POST endpoint '/' missing attribute email. | ||
""" | ||
User.query.delete() | ||
|
||
db.session.execute(delete(User)) | ||
db.session.commit() | ||
data = { | ||
"name": "Test User", | ||
"password": "password", | ||
|
@@ -182,7 +188,9 @@ def test_create_user_missing_attribute_password(admin_request, notify_db_session | |
""" | ||
Tests POST endpoint '/' missing attribute password. | ||
""" | ||
User.query.delete() | ||
|
||
db.session.execute(delete(User)) | ||
db.session.commit() | ||
data = { | ||
"name": "Test User", | ||
"email_address": "[email protected]", | ||
|