try fixing pagination

This commit is contained in:
Kenneth Kehl
2024-11-18 12:32:28 -08:00
parent 552d4644da
commit e7abb06b91
2 changed files with 5 additions and 5 deletions

View File

@@ -14,8 +14,8 @@ from app.models import ApiKey
def create_service_authorization_header(service_id, key_type=KeyType.NORMAL):
client_id = str(service_id)
secrets = (
db.session.execute(select(ApiKey))
.filter_by(service_id=service_id, key_type=key_type)
db.session.execute(select(ApiKey)
.filter_by(service_id=service_id, key_type=key_type))
.scalars()
.all()
)

View File

@@ -279,7 +279,7 @@ def test_dao_get_paginated_inbound_sms_for_service_for_public_api_no_inbound_sms
sample_service.id
)
assert inbound_from_db == []
assert inbound_from_db.has_next() is False
def test_dao_get_paginated_inbound_sms_for_service_for_public_api_page_size_returns_correct_size(
@@ -299,7 +299,7 @@ def test_dao_get_paginated_inbound_sms_for_service_for_public_api_page_size_retu
sample_service.id, older_than=reversed_inbound_sms[1].id, page_size=2
)
assert len(inbound_from_db) == 2
assert inbound_from_db.total == 2
def test_dao_get_paginated_inbound_sms_for_service_for_public_api_older_than_returns_correct_list(
@@ -339,7 +339,7 @@ def test_dao_get_paginated_inbound_sms_for_service_for_public_api_older_than_end
sample_service.id, older_than=reversed_inbound_sms[1].id, page_size=2
)
assert inbound_from_db == []
assert inbound_from_db.has_next is False
def test_most_recent_inbound_sms_only_returns_most_recent_for_each_number(