mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
add test file for schemas
This commit is contained in:
10
tests/app/test_schemas.py
Normal file
10
tests/app/test_schemas.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def test_job_schema_doesnt_return_notifications(sample_notification):
|
||||
from app.schemas import job_schema
|
||||
|
||||
job = sample_notification.job
|
||||
assert job.notifications.count() == 1
|
||||
|
||||
data, errors = job_schema.dump(job)
|
||||
|
||||
assert not errors
|
||||
assert 'notifications' not in data
|
||||
Reference in New Issue
Block a user