[Zope-Checkins] CVS: Zope/lib/python/OFS/tests - testRanges.py:1.9.2.1
Martijn Pieters
mj@zope.com
Tue, 4 Dec 2001 17:42:59 -0500
Update of /cvs-repository/Zope/lib/python/OFS/tests
In directory cvs.zope.org:/tmp/cvs-serv29464/lib/python/OFS/tests
Modified Files:
Tag: Zope-2_5-branch
testRanges.py
Log Message:
Merge HTTP Ranges fix from 2.4 branch
=== Zope/lib/python/OFS/tests/testRanges.py 1.9 => 1.9.2.1 ===
self.expectSingleRange('-0,3-23', 3, 24)
- def testAdjacentRanges(self):
- self.expectSingleRange('21-25,10-20', 10, 26)
-
def testEndOverflow(self):
l = len(self.data)
start, end = l - 10, l + 10
@@ -301,6 +298,9 @@
self.expectSingleRange(range, start, len(self.data))
# Multiple ranges
+ def testAdjacentRanges(self):
+ self.expectMultipleRanges('21-25,10-20', [(10, 21), (21, 26)])
+
def testMultipleRanges(self):
self.expectMultipleRanges('3-7,10-15', [(3, 8), (10, 16)])
@@ -320,10 +320,10 @@
def testIllegalIfRange(self):
# We assume that an illegal if-range is to be ignored, just like an
# illegal if-modified since.
- self.expectSingleRange('21-25,10-20', 10, 26, if_range='garbage')
+ self.expectSingleRange('21-25,10-21', 10, 26, if_range='garbage')
def testEqualIfRangeDate(self):
- self.expectSingleRange('21-25,10-20', 10, 26,
+ self.expectSingleRange('21-25,10-21', 10, 26,
if_range=self.createLastModifiedDate())
def testIsModifiedIfRangeDate(self):
@@ -331,11 +331,11 @@
if_range=self.createLastModifiedDate(offset=-100))
def testIsNotModifiedIfRangeDate(self):
- self.expectSingleRange('21-25,10-20', 10, 26,
+ self.expectSingleRange('21-25,10-21', 10, 26,
if_range=self.createLastModifiedDate(offset=100))
def testEqualIfRangeEtag(self):
- self.expectSingleRange('21-25,10-20', 10, 26,
+ self.expectSingleRange('21-25,10-21', 10, 26,
if_range=self.file.http__etag())
def testNotEqualIfRangeEtag(self):