'Test to validate case in which error are found:
One vuln is common to several pages and others are isolated.'

def test_found_vuln(self):

    cfg = self._run_configs['cfg_with_error']
    self._scan(cfg['target'], cfg['plugins'])
    vulns = self.kb.get('csp', 'csp')
    EXPECTED = ["Directive    'default-src'    allows    all    sources.", "Directive    'script-src'    allows    all    javascript    sources.", "Directive    'script-src'    is    defined    but    no    directive    'script-nonce'    is    defined    to    protect    javascript    resources.", "Directive    'object-src'    allows    all    plugin    sources.", 'Some    directives    are    misspelled:    def-src,    sript-src']
    vuln_descs = set([v.get_desc(with_id=False) for v in vulns])
    self.assertEqual(set(EXPECTED), vuln_descs)
    self.assertAllVulnNamesEqual('CSP    vulnerability', vulns)
    NOT_IN_FILENAME = 'csp_without_error.html'
    vuln_fnames = set([v.get_url().get_file_name() for v in vulns])
    self.assertNotIn(NOT_IN_FILENAME, vuln_fnames)
