Accept CSV files with additional columns

Currently when the Celery task processes a CSV it will call the API with the
values for all the non-recipient columns in the `personalisation` field. This
means that those API calls would fail, even though the CSV has been processed
‘successfully’.

This was not being caught by the tests, so this commit adds extra tests to check
what data the task is passing to the API call.

It then updates utils to version 2.0.1 which brings in this fix:
https://github.com/alphagov/notifications-utils/pull/10
This commit is contained in:
Chris Hill-Scott
2016-03-09 07:27:26 +00:00
parent 528f570ab6
commit 589b4de5f9
6 changed files with 58 additions and 31 deletions

View File

@@ -220,6 +220,20 @@ def sample_job(notify_db,
return job
@pytest.fixture(scope='function')
def sample_job_with_placeholdered_template(
notify_db,
notify_db_session,
service=None
):
return sample_job(
notify_db,
notify_db_session,
service=service,
template=sample_template_with_placeholders(notify_db, notify_db_session)
)
@pytest.fixture(scope='function')
def sample_email_job(notify_db,
notify_db_session,