summaryrefslogtreecommitdiff
path: root/project1/proj1_s4498062/webtests.py
diff options
context:
space:
mode:
Diffstat (limited to 'project1/proj1_s4498062/webtests.py')
-rw-r--r--project1/proj1_s4498062/webtests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/project1/proj1_s4498062/webtests.py b/project1/proj1_s4498062/webtests.py
index 5e45acf..b0ff889 100644
--- a/project1/proj1_s4498062/webtests.py
+++ b/project1/proj1_s4498062/webtests.py
@@ -114,6 +114,13 @@ class TestGetRequests(unittest.TestCase):
"""GET which requests an existing resource using gzip encodign, which
is accepted by the server.
"""
+ r1 = self.request('GET', '/test', self.default_headers + \
+ [('Accept-Encoding', 'gzip;q=1, identity;q=0')])
+ self.assertEqual(r1.get_header('Content-Encoding'), 'gzip')
+ r1.decompress()
+ r2 = self.request('GET', '/test', self.default_headers + \
+ [('Accept-Encoding', '')])
+ self.assertEqual(r1.body, r2.body)
pass
def test_doubledot(self):