'When L{http.Request.setLastModified} is called multiple times, the
highest supplied value is honored. If that value is lower than the
if-modified-since date in the request header, the method returns
L{http.CACHED}.'

def test_setLastModifiedTwiceCached(self):

    req = http.Request(DummyChannel(), False)
    req.requestHeaders.setRawHeaders(networkString('if-modified-since'), ['01    Jan    1999    00:00:01    GMT'])
    req.setLastModified(1)
    result = req.setLastModified(0)
    self.assertEqual(result, http.CACHED)
