def test_setLastModifiedCached(self):
        """
        If the resource is older than the if-modified-since date in the request
        header, L{http.Request.setLastModified} returns L{http.CACHED}.
        """
        req = http.Request(DummyChannel(), False)
        req.requestHeaders.setRawHeaders(
            networkString('if-modified-since'),
                          [b'02 Jan 1970 00:00:00 GMT']
            )

        result = req.setLastModified(42)

        self.assertEqual(result, http.CACHED)

        If the resource is older than the if-modified-since date in the request
        header, L{http.Request.setLastModified} returns L{http.CACHED}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py