'A helper function that takes a scan database file and yields tests.
:return: (A modified url_object with the special query from the
scan_database,
The parsed parameters from the scan database line)'

def test_generator(self):

    try:
        db_file = codecs.open(self.filename, 'r', 'utf-8')
    except Exception as e:
        msg = 'Failed    to    open    the    scan    database.    Exception:    "%s".'
        om.out.error((msg % e))
        raise StopIteration
    for line in db_file:
        if self._is_comment(line):
            continue
        for nikto_test in itertools.ifilter(self._filter_special, self._parse_db_line(line)):
            (yield (nikto_test,))
