def test_heirarchy_two_levels(self): treestr = '{"$and": [{"reading": {"$gte": 0}}, {"teaching_or_training": {"$gte": 0}}, {"$or": [{"research": {"$gte": 0}}, {"eating": {"$gte": 0}}]}]}' tree = json.loads(treestr) print tree qt = QueryTree(tree, debug=True) print "Result = ", qt.sql()
def test_heirarchy_and(self): treestr = '{"$and": [{"reading": {"$gte": 0}}, {"teaching_or_training": {"$gte": 0}}]}' tree = json.loads(treestr) qt = QueryTree(tree) print qt.sql()