diff --git a/tests/app/test_schemas.py b/tests/app/test_schemas.py new file mode 100644 index 000000000..73d35002a --- /dev/null +++ b/tests/app/test_schemas.py @@ -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