diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-03 09:51:49 -0800 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-03 09:51:49 -0800 |
| commit | 7288e1b02b2504b1694fe14df2d81e6a354c5610 (patch) | |
| tree | a4bb2a34ffc03d4939c6d8f961bddc1918b8fd9c /tests/conditional_processing | |
| parent | 91078f566904e49fbf99ec6375ba627e821f6143 (diff) | |
| parent | 4f151da1e5e9bf527548a5737d9cd314e3abc68e (diff) | |
Merge pull request #1852 from jasonamyers/cleanup/PEP8
Cleanup/pep8 tests
Diffstat (limited to 'tests/conditional_processing')
| -rw-r--r-- | tests/conditional_processing/tests.py | 1 | ||||
| -rw-r--r-- | tests/conditional_processing/views.py | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/conditional_processing/tests.py b/tests/conditional_processing/tests.py index 77f1ff54ed..2c832e527c 100644 --- a/tests/conditional_processing/tests.py +++ b/tests/conditional_processing/tests.py @@ -15,6 +15,7 @@ EXPIRED_LAST_MODIFIED_STR = 'Sat, 20 Oct 2007 23:21:47 GMT' ETAG = 'b4246ffc4f62314ca13147c9d4f76974' EXPIRED_ETAG = '7fae4cd4b0f81e7d2914700043aa8ed6' + class ConditionalGet(TestCase): urls = 'conditional_processing.urls' diff --git a/tests/conditional_processing/views.py b/tests/conditional_processing/views.py index 2960e0533d..496e79fd34 100644 --- a/tests/conditional_processing/views.py +++ b/tests/conditional_processing/views.py @@ -8,18 +8,22 @@ def index(request): return HttpResponse(FULL_RESPONSE) index = condition(lambda r: ETAG, lambda r: LAST_MODIFIED)(index) + def last_modified_view1(request): return HttpResponse(FULL_RESPONSE) last_modified_view1 = condition(last_modified_func=lambda r: LAST_MODIFIED)(last_modified_view1) + def last_modified_view2(request): return HttpResponse(FULL_RESPONSE) last_modified_view2 = last_modified(lambda r: LAST_MODIFIED)(last_modified_view2) + def etag_view1(request): return HttpResponse(FULL_RESPONSE) etag_view1 = condition(etag_func=lambda r: ETAG)(etag_view1) + def etag_view2(request): return HttpResponse(FULL_RESPONSE) etag_view2 = etag(lambda r: ETAG)(etag_view2) |
