mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 02:23:32 -04:00
remove all() from statement
This commit is contained in:
@@ -1225,8 +1225,8 @@ def test_query_organization_sms_usage_for_year_handles_multiple_services(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
|
stmt = query_organization_sms_usage_for_year(org.id, 2022)
|
||||||
result = query_organization_sms_usage_for_year(org.id, 2022).all()
|
result = db.session.execute(stmt).all()
|
||||||
|
|
||||||
service_1_rows = [row._asdict() for row in result if row.service_id == service_1.id]
|
service_1_rows = [row._asdict() for row in result if row.service_id == service_1.id]
|
||||||
service_2_rows = [row._asdict() for row in result if row.service_id == service_2.id]
|
service_2_rows = [row._asdict() for row in result if row.service_id == service_2.id]
|
||||||
@@ -1296,10 +1296,9 @@ def test_query_organization_sms_usage_for_year_handles_multiple_rates(
|
|||||||
financial_year_start=current_year,
|
financial_year_start=current_year,
|
||||||
)
|
)
|
||||||
|
|
||||||
result = [
|
stmt = query_organization_sms_usage_for_year(org.id, 2022)
|
||||||
row._asdict()
|
rows = db.session.execute(rows).all()
|
||||||
for row in query_organization_sms_usage_for_year(org.id, 2022).all()
|
result = [row._asdict() for row in rows]
|
||||||
]
|
|
||||||
|
|
||||||
# al lthe free allowance is used on the first day
|
# al lthe free allowance is used on the first day
|
||||||
assert result[0]["local_date"] == date(2022, 4, 29)
|
assert result[0]["local_date"] == date(2022, 4, 29)
|
||||||
|
|||||||
Reference in New Issue
Block a user