def assertCategories(self, elem, expected):
    self.assertEqual(set((i.firstChild.wholeText for i in elem.childNodes if (i.nodeName == 'category'))), set(expected))
def assertCategories(self, elem, expected):
    self.assertEqual(set((i.firstChild.wholeText for i in elem.childNodes if (i.nodeName == 'category'))), set(expected))