Add test for backwards range.
authorEmil Mikulic <emikulic@gmail.com>
Sun, 1 May 2011 08:56:04 +0000 (18:56 +1000)
committerEmil Mikulic <emikulic@gmail.com>
Sun, 28 Apr 2013 10:56:46 +0000 (20:56 +1000)
devel/test.py

index fdfb256..f88c1f1 100755 (executable)
@@ -229,6 +229,11 @@ class TestFileGet(TestHelper):
         status, hdrs, body = parse(resp)
         self.assertContains(status, "416 Requested Range Not Satisfiable")
 
+    def test_range_backwards(self):
+        resp = Conn().get(self.url, req_hdrs = {"Range": "bytes=20-10"})
+        status, hdrs, body = parse(resp)
+        self.assertContains(status, "416 Requested Range Not Satisfiable")
+
 if __name__ == '__main__':
     setUpModule()
     unittest.main()