def METHOD_NAME(self):
    with session.begin():
        task=data_setup.create_task(path=u'/testing/path',
                                    description=u'blah',
                                    exclude_arches=[u'i386', u'ppc'],
                                    exclude_osmajors=[u'MajorFoo', u'WunderFooBar'],
                                    requires=[u'2+2', u'Tofudebeast'],
                                    runfor=[u'philip', u'bradley'],
                                    type=[u'type3', u'type4'],
                                    )
    # regular xml
    out = run_client(['bkr', 'task-details', '--xml', task.name])
    task_elem = lxml.etree.fromstring(re.sub(task.name, '', out, count=1))
    self.assert_(task_elem.get('version') == task.version)
    self.assert_(task_elem.get('nda')  == task.nda or 'False')
    self.assert_(task_elem.get('name') == task.name)
    self.assert_(task_elem.get('destructive') == task.destructive or 'False')
    self.assert_(task_elem.find('description').text == task.description)
    self.assert_(task_elem.find('owner').text == task.owner)
    self.assert_(task_elem.find('path').text == task.path)
    self.assert_(len(task_elem.xpath("types/type[text()='type3']")) == 1)
    self.assert_(len(task_elem.xpath("types/type[text()='type4']")) == 1)
    self.assert_(len(task_elem.xpath("requires/package[text()='Tofudebeast']")) == 1)
    self.assert_(len(task_elem.xpath("requires/package[text()='2+2']")) == 1)
    self.assert_(len(task_elem.xpath("runFor/package[text()='philip']")) == 1)
    self.assert_(len(task_elem.xpath("runFor/package[text()='bradley']")) == 1)
    self.assert_(len(task_elem.xpath("excludedDistroFamilies/distroFamily[text()='MajorFoo']")) == 1)
    self.assert_(len(task_elem.xpath("excludedDistroFamilies/distroFamily[text()='WunderFooBar']")) == 1)
    self.assert_(len(task_elem.xpath("excludedArches/arch[text()='i386']")) == 1)
    self.assert_(len(task_elem.xpath("excludedArches/arch[text()='ppc']")) == 1)
    # pretty xml
    pretty_out = run_client(['bkr', 'task-details', '--prettyxml', task.name])
    pretty_minus_leading_name = re.sub(task.name, '', pretty_out, count=1)
    task_elem_pretty = lxml.etree.tostring(task_elem, pretty_print=True, encoding='utf8')
    self.assert_(task_elem_pretty.strip() == pretty_minus_leading_name.strip())