'Even when fuzz_cookies is True, we won\'t create HeaderMutants based
on a FuzzableRequest. This is one of the ugly things related with
https://github.com/andresriancho/w3af/issues/3149
Which we fixed!'

def test_qs_and_cookie(self):

    cf_singleton.save('fuzzable_headers', [])
    cf_singleton.save('fuzz_cookies', True)
    cf_singleton.save('fuzz_url_filenames', False)
    cf_singleton.save('fuzzed_files_extension', 'gif')
    cf_singleton.save('fuzz_form_files', False)
    cf_singleton.save('fuzz_url_parts', False)
    url = URL('http://moth/?id=1')
    cookie = Cookie('foo=bar')
    freq = FuzzableRequest(url, cookie=cookie)
    mutants = create_mutants(freq, self.payloads)
    expected_urls = [u'http://moth/?id=abc', u'http://moth/?id=def', u'http://moth/?id=1', u'http://moth/?id=1']
    generated_urls = [m.get_uri().url_string for m in mutants]
    self.assertEqual(generated_urls, expected_urls)
    self.assertAllInstance(mutants[:2], QSMutant)
    self.assertAllInstance(mutants[2:], CookieMutant)
    self.assertAllHaveTokens(mutants)
