use created_by instead of updated_by

to behave in same way as other endpoints
This commit is contained in:
Leo Hemsted
2017-06-29 12:39:02 +01:00
parent 4839665270
commit 2f973b8af0
2 changed files with 8 additions and 8 deletions

View File

@@ -552,7 +552,7 @@ def test_update_redact_template(admin_request, sample_template):
data = {
'redact_personalisation': True,
'updated_by_id': str(sample_template.created_by_id)
'created_by': str(sample_template.created_by_id)
}
dt = datetime.now()
@@ -578,7 +578,7 @@ def test_update_redact_template_ignores_other_properties(admin_request, sample_t
data = {
'name': 'Foo',
'redact_personalisation': True,
'updated_by_id': str(sample_template.created_by_id)
'created_by': str(sample_template.created_by_id)
}
admin_request.post(
@@ -599,7 +599,7 @@ def test_update_redact_template_does_nothing_if_already_redacted(admin_request,
data = {
'redact_personalisation': True,
'updated_by_id': str(sample_template.created_by_id)
'created_by': str(sample_template.created_by_id)
}
with freeze_time(dt + timedelta(days=1)):
@@ -617,7 +617,7 @@ def test_update_redact_template_does_nothing_if_already_redacted(admin_request,
assert sample_template.template_redacted.updated_at == dt
def test_update_redact_template_400s_if_no_updated_by(admin_request, sample_template):
def test_update_redact_template_400s_if_no_created_by(admin_request, sample_template):
original_updated_time = sample_template.template_redacted.updated_at
resp = admin_request.post(
'template.update_template',
@@ -629,7 +629,7 @@ def test_update_redact_template_400s_if_no_updated_by(admin_request, sample_temp
assert resp == {
'result': 'error',
'message': {'updated_by_id': ['Field is required']}
'message': {'created_by': ['Field is required']}
}
assert sample_template.redact_personalisation is False