':see: https://github.com/andresriancho/w3af/issues/2181'

def test_kb_list_shells_rfi_port_scan_2181(self):

    w3af_core = w3afCore()
    vuln = MockVuln()
    url = URL('http://moth/?a=1')
    freq = FuzzableRequest(url)
    exploit_mutant = QSMutant.create_mutants(freq, [''], [], False, {})[0]
    shell = PortScanShell(vuln, w3af_core.uri_opener, w3af_core.worker_pool, exploit_mutant)
    kb.append('a', 'b', shell)
    shells = kb.get_all_shells(w3af_core=w3af_core)
    self.assertEqual(len(shells), 1)
    unpickled_shell = shells[0]
    self.assertEqual(shell, unpickled_shell)
    self.assertIs(unpickled_shell._uri_opener, w3af_core.uri_opener)
    self.assertIs(unpickled_shell.worker_pool, w3af_core.worker_pool)
    self.assertEqual(unpickled_shell._exploit_mutant, exploit_mutant)
    w3af_core.quit()
