'A HEAD request opens the file, gets the size, and then closes it after
the request.'

def test_HEADClosesFile(self):

    (fakeFile, file) = self._makeFilePathWithStringIO()
    request = DummyRequest([''])
    request.method = 'HEAD'
    self.successResultOf(_render(file, request))
    self.assertEqual(''.join(request.written), '')
    self.assertTrue(fakeFile.closed)
