add test file for schemas

This commit is contained in:
Leo Hemsted
2016-06-10 15:54:21 +01:00
parent 7083be429a
commit edc72a57ca

10
tests/app/test_schemas.py Normal file
View 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