From 14879ac61ddc8b08ad70f93eb21fcadd7b2574fb Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 10 Sep 2016 08:23:53 -0400 Subject: [PATCH] Used decorators in conditional_processing test views. --- tests/conditional_processing/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/conditional_processing/views.py b/tests/conditional_processing/views.py index de0810c0d36..47288dbc563 100644 --- a/tests/conditional_processing/views.py +++ b/tests/conditional_processing/views.py @@ -4,29 +4,29 @@ from django.views.decorators.http import condition, etag, last_modified from .tests import ETAG, FULL_RESPONSE, LAST_MODIFIED +@condition(lambda r: ETAG, lambda r: LAST_MODIFIED) def index(request): return HttpResponse(FULL_RESPONSE) -index = condition(lambda r: ETAG, lambda r: LAST_MODIFIED)(index) +@condition(last_modified_func=lambda r: LAST_MODIFIED) def last_modified_view1(request): return HttpResponse(FULL_RESPONSE) -last_modified_view1 = condition(last_modified_func=lambda r: LAST_MODIFIED)(last_modified_view1) +@last_modified(lambda r: LAST_MODIFIED) def last_modified_view2(request): return HttpResponse(FULL_RESPONSE) -last_modified_view2 = last_modified(lambda r: LAST_MODIFIED)(last_modified_view2) +@condition(etag_func=lambda r: ETAG) def etag_view1(request): return HttpResponse(FULL_RESPONSE) -etag_view1 = condition(etag_func=lambda r: ETAG)(etag_view1) +@etag(lambda r: ETAG) def etag_view2(request): return HttpResponse(FULL_RESPONSE) -etag_view2 = etag(lambda r: ETAG)(etag_view2) @condition(etag_func=lambda r: ETAG.strip('"'))