@mock.patch('os.makedirs')
    @mock.patch('os.path.exists')
    def test_create(self, exists_mock, makedirs):
        expected = """<pool type='dir'><name>foo</name><uuid>foo</uuid><target>""" +\
                   """<path>/pool/path/foo</path></target></pool>"""
        hypervisor = mock.Mock()
        exists_mock.return_value = False
        qemu.pool_create(hypervisor, 'foo', '/pool/path')
        results = hypervisor.storagePoolCreateXML.call_args_list[0][0][0]
        results = results.replace('\n', '').replace('\t', '').replace('  ', '')
        makedirs.assert_called_with('/pool/path/foo')
        self.assertEqual(results, expected, compare(results, expected))
Return a markup event stream for the fragment.
dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py/PoolCreateTest.test_create--crossover with--dataset/ETHPy150Open timonwong/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/python2/genshi/builder.py/Element.generate