'Makes sure that we\'re able to use a self-contained profile and that
it\'s transparent for the plugin code.'

def test_use_self_contained_profile(self):

    commands_to_run = ['profiles', 'use    OWASP_TOP10', ('save_as    %s    self-contained' % self.get_profile_name()), 'back', 'profiles', ('use    %s' % self.get_profile_name()), 'back', 'plugins    audit    config    ssl_certificate', 'view', 'exit']
    self.console = ConsoleUI(commands=commands_to_run, do_upd=False)
    self.console.sh()
    for line in self._mock_stdout.messages:
        match = re.search('(/tmp/w3af-.*-sc\\.dat)', line)
        if (not match):
            continue
        filename = match.group(0)
        self.assertIn('Bundle    of    CA    Root    Certificates', file(filename).read())
        break
    else:
        self.assertTrue(False, 'No    self    contained    file    found')
