'This is a rather complex setUp since I need to create an instance of
the count.py plugin in memory, without copying it to any plugins
directory since that would generate issues with other tests.'

def setUp(self):

    self.w3afcore = w3afCore()
    target_opts = create_target_option_list(URL(get_moth_http()))
    self.w3afcore.target.set_options(target_opts)
    plugin_inst = factory(self.PLUGIN)
    plugin_inst.set_url_opener(self.w3afcore.uri_opener)
    plugin_inst.set_worker_pool(self.w3afcore.worker_pool)
    self.w3afcore.plugins.plugins['crawl'] = [plugin_inst]
    self.w3afcore.plugins._plugins_names_dict['crawl'] = ['count']
    self.count_plugin = plugin_inst
    self.w3afcore.plugins.initialized = True
    self.w3afcore.verify_environment()
