'Tests that no info is created if the site redirects internally'

@httpretty.activate
def test_alert_if_target_is_301_all_internal_redir(self):

    core = w3afCore()
    httpretty.register_uri(httpretty.GET, re.compile('w3af.com/(.*)'), body='301', status=301, adding_headers={'Location': 'http://w3af.com/xyz'})
    target = core.target.get_options()
    target['target'].set_value('http://w3af.com/')
    core.target.set_options(target)
    core.plugins.set_plugins(['sqli'], 'audit')
    core.plugins.init_plugins()
    core.verify_environment()
    core.scan_start_hook()
    strategy = CoreStrategy(core)
    strategy.start()
    infos = kb.get('core', 'core')
    self.assertEqual(len(infos), 0, infos)
