summaryrefslogtreecommitdiff
path: root/tests/conditional_processing/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conditional_processing/tests.py')
-rw-r--r--tests/conditional_processing/tests.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/conditional_processing/tests.py b/tests/conditional_processing/tests.py
index 162a405d91..934ca5c4ec 100644
--- a/tests/conditional_processing/tests.py
+++ b/tests/conditional_processing/tests.py
@@ -31,11 +31,11 @@ class ConditionalGet(TestCase):
self.assertEqual(response.status_code, 304)
self.assertEqual(response.content, b'')
- def testWithoutConditions(self):
+ def test_without_conditions(self):
response = self.client.get('/condition/')
self.assertFullResponse(response)
- def testIfModifiedSince(self):
+ def test_if_modified_since(self):
self.client.defaults['HTTP_IF_MODIFIED_SINCE'] = LAST_MODIFIED_STR
response = self.client.get('/condition/')
self.assertNotModified(response)
@@ -49,7 +49,7 @@ class ConditionalGet(TestCase):
response = self.client.get('/condition/')
self.assertFullResponse(response)
- def testIfNoneMatch(self):
+ def test_if_none_match(self):
self.client.defaults['HTTP_IF_NONE_MATCH'] = '"%s"' % ETAG
response = self.client.get('/condition/')
self.assertNotModified(response)
@@ -62,7 +62,7 @@ class ConditionalGet(TestCase):
response = self.client.get('/condition/')
self.assertNotModified(response)
- def testIfMatch(self):
+ def test_if_match(self):
self.client.defaults['HTTP_IF_MATCH'] = '"%s"' % ETAG
response = self.client.put('/condition/etag/')
self.assertEqual(response.status_code, 200)
@@ -70,7 +70,7 @@ class ConditionalGet(TestCase):
response = self.client.put('/condition/etag/')
self.assertEqual(response.status_code, 412)
- def testBothHeaders(self):
+ def test_both_headers(self):
self.client.defaults['HTTP_IF_MODIFIED_SINCE'] = LAST_MODIFIED_STR
self.client.defaults['HTTP_IF_NONE_MATCH'] = '"%s"' % ETAG
response = self.client.get('/condition/')
@@ -86,45 +86,45 @@ class ConditionalGet(TestCase):
response = self.client.get('/condition/')
self.assertFullResponse(response)
- def testSingleCondition1(self):
+ def test_single_condition_1(self):
self.client.defaults['HTTP_IF_MODIFIED_SINCE'] = LAST_MODIFIED_STR
response = self.client.get('/condition/last_modified/')
self.assertNotModified(response)
response = self.client.get('/condition/etag/')
self.assertFullResponse(response, check_last_modified=False)
- def testSingleCondition2(self):
+ def test_single_condition_2(self):
self.client.defaults['HTTP_IF_NONE_MATCH'] = '"%s"' % ETAG
response = self.client.get('/condition/etag/')
self.assertNotModified(response)
response = self.client.get('/condition/last_modified/')
self.assertFullResponse(response, check_etag=False)
- def testSingleCondition3(self):
+ def test_single_condition_3(self):
self.client.defaults['HTTP_IF_MODIFIED_SINCE'] = EXPIRED_LAST_MODIFIED_STR
response = self.client.get('/condition/last_modified/')
self.assertFullResponse(response, check_etag=False)
- def testSingleCondition4(self):
+ def test_single_condition_4(self):
self.client.defaults['HTTP_IF_NONE_MATCH'] = '"%s"' % EXPIRED_ETAG
response = self.client.get('/condition/etag/')
self.assertFullResponse(response, check_last_modified=False)
- def testSingleCondition5(self):
+ def test_single_condition_5(self):
self.client.defaults['HTTP_IF_MODIFIED_SINCE'] = LAST_MODIFIED_STR
response = self.client.get('/condition/last_modified2/')
self.assertNotModified(response)
response = self.client.get('/condition/etag2/')
self.assertFullResponse(response, check_last_modified=False)
- def testSingleCondition6(self):
+ def test_single_condition_6(self):
self.client.defaults['HTTP_IF_NONE_MATCH'] = '"%s"' % ETAG
response = self.client.get('/condition/etag2/')
self.assertNotModified(response)
response = self.client.get('/condition/last_modified2/')
self.assertFullResponse(response, check_etag=False)
- def testInvalidETag(self):
+ def test_invalid_etag(self):
self.client.defaults['HTTP_IF_NONE_MATCH'] = r'"\"'
response = self.client.get('/condition/etag/')
self.assertFullResponse(response, check_last_modified=False)