コード例 #1
0
    def test_verify_test_run(self):
        """
        Bad example of a unit test. This method verifies that with the test data
        everything is registered correctly in the db.

        :return:
        """

        self.remove_archive_folders()

        ma = ModsecAudit(verbose=False, settings=settings)
        ma.set_exit_on_end(False)
        ma.init_db()

        self.empty_tables(ma)

        ma.main()
        ma.end()

        self.check_runstatus(ma)
        self.check_sites(ma)
        self.check_ips(ma)
        self.check_hits(ma)
        self.check_parse_errors(ma)