'Helper which verifies that C{fileName} exists in C{fileDir} and it has
some content.
@param fileDir: A path to a directory.
@type fileDir: L{FilePath}
@param fileName: The last path segment of a file which may exist within
C{fileDir}.
@type fileName: L{str}
@raise: L{FailTest <twisted.trial.unittest.FailTest>} if
C{fileDir.child(fileName)}:
1. Does not exist.
2. Is empty.
3. In the case where it\'s a path to a C{.html} file, the
content looks like an HTML file.
@return: L{None}'

def verifyFileExists(self, fileDir, fileName):

    fpath = fileDir.child(fileName)
    self.assertTrue(fpath.exists())
    fcontents = fpath.getContent()
    self.assertTrue((len(fcontents) > 0))
    if fpath.path.endswith('.html'):
        self.assertIn('<body', fcontents)
