mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
fix filter_bys
This commit is contained in:
@@ -29,7 +29,7 @@ def test_api_key_should_create_new_api_key_for_service(notify_api, sample_servic
|
||||
assert "data" in json.loads(response.get_data(as_text=True))
|
||||
saved_api_key = (
|
||||
db.session.execute(
|
||||
select(ApiKey).filter_by(service_id=sample_service.id)
|
||||
select(ApiKey).where(ApiKey.service_id == sample_service.id)
|
||||
)
|
||||
.scalars()
|
||||
.first()
|
||||
|
||||
@@ -88,7 +88,7 @@ def test_deactivating_service_creates_history(archived_service):
|
||||
history = (
|
||||
db.session.execute(
|
||||
select(ServiceHistory)
|
||||
.filter_by(id=archived_service.id)
|
||||
.where(ServiceHistory.id == archived_service.id)
|
||||
.order_by(ServiceHistory.version.desc())
|
||||
)
|
||||
.scalars()
|
||||
|
||||
@@ -81,7 +81,7 @@ def test_service_history_is_created(client, sample_service, action, original_sta
|
||||
history = (
|
||||
db.session.execute(
|
||||
select(ServiceHistory)
|
||||
.filter_by(id=sample_service.id)
|
||||
.where(ServiceHistory.id == sample_service.id)
|
||||
.order_by(ServiceHistory.version.desc())
|
||||
)
|
||||
.scalars()
|
||||
|
||||
Reference in New Issue
Block a user