From edc72a57ca8b8a20e13dd2f2c95afbf88eb5b9d6 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Fri, 10 Jun 2016 15:54:21 +0100 Subject: [PATCH] add test file for schemas --- tests/app/test_schemas.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/app/test_schemas.py 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