def testParsePackageNode(self): example_xml_string = ( '<package name="com.foo.bar">' '<class name="Class1" extends="java.lang.Object">' '</class>' '<class name="Class2" extends="java.lang.Object">' '</class>' '</package>') actual = dexdump._ParsePackageNode( ElementTree.fromstring(example_xml_string)) expected = { 'classes': { 'Class1': { 'methods': [], 'superclass': 'java.lang.Object', }, 'Class2': { 'methods': [], 'superclass': 'java.lang.Object', }, }, } self.assertEquals(expected, actual)
def testParsePackageNode(self): example_xml_string = ( '<package name="com.foo.bar">' '<class name="Class1" extends="java.lang.Object">' '</class>' '<class name="Class2" extends="java.lang.Object">' '</class>' '</package>') actual = dexdump._ParsePackageNode( ElementTree.fromstring(example_xml_string)) expected = { 'classes': { 'Class1': { 'methods': [], 'superclass': 'java.lang.Object', }, 'Class2': { 'methods': [], 'superclass': 'java.lang.Object', }, }, } self.assertEqual(expected, actual)
def testParsePackageNode(self): example_xml_string = ('<package name="com.foo.bar">' '<class name="Class1">' '</class>' '<class name="Class2">' '</class>' '</package>') actual = dexdump._ParsePackageNode( ElementTree.fromstring(example_xml_string)) expected = { 'classes': { 'Class1': { 'methods': [], }, 'Class2': { 'methods': [], }, }, } self.assertEquals(expected, actual)