mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-08 20:53:11 -04:00
New field on GET /notifications to allow users to request CSV data
This commit is contained in:
@@ -421,6 +421,7 @@ class NotificationsFilterSchema(ma.Schema):
|
|||||||
page = fields.Int(required=False)
|
page = fields.Int(required=False)
|
||||||
page_size = fields.Int(required=False)
|
page_size = fields.Int(required=False)
|
||||||
limit_days = fields.Int(required=False)
|
limit_days = fields.Int(required=False)
|
||||||
|
include_jobs = fields.Boolean(required=False)
|
||||||
|
|
||||||
@pre_load
|
@pre_load
|
||||||
def handle_multidict(self, in_data):
|
def handle_multidict(self, in_data):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
def test_job_schema_doesnt_return_notifications(sample_notification):
|
def test_job_schema_doesnt_return_notifications(sample_notification_with_job):
|
||||||
from app.schemas import job_schema
|
from app.schemas import job_schema
|
||||||
|
|
||||||
job = sample_notification.job
|
job = sample_notification_with_job.job
|
||||||
assert job.notifications.count() == 1
|
assert job.notifications.count() == 1
|
||||||
|
|
||||||
data, errors = job_schema.dump(job)
|
data, errors = job_schema.dump(job)
|
||||||
|
|||||||
Reference in New Issue
Block a user