def test_attr_list(self): root = JsonSelector(self.tree) self.assertRaises( NotImplementedError, lambda: root.select('$..population').attr_list('bar'))
def test_text_list(self): root = JsonSelector(self.tree) self.assertEquals(['7000000000', '0'], root.select('$..population').text_list())
def test_html(self): root = JsonSelector(self.tree) self.assertRaises(NotImplementedError, lambda: root.select('$..population')[0].html())
def test_select_select(self): root = JsonSelector(self.tree) self.assertEquals('Mars', root.select('$[1]').select('name').text())
def test_attr_list(self): root = JsonSelector(self.tree) self.assertRaises(NotImplementedError, lambda: root.select('$..population').attr_list('bar'))
def test_html(self): root = JsonSelector(self.tree) self.assertRaises(NotImplementedError, lambda: root.select('$..population')[0].html())
def test_text_list(self): root = JsonSelector(self.tree) self.assertEquals(['7000000000', '0'], root.select('$..population').text_list())
def test_select_select(self): root = JsonSelector(self.tree) self.assertEquals('Mars', root.select('$[1]').select('name').text())