('1 AND 2 OR 3',ComplexQuery([ComplexQuery([Query(None,'1'),Query(None,'2')],operator='and'),Query(None,'3')],operator='or')),
('1 AND 2 OR 3',ComplexQuery([ComplexQuery([Query(None,'1'),Query(None,'2')],logical_operator='and'),Query(None,'3')],logical_operator='or')),
('1 OR 2 AND 3',ComplexQuery([Query(None,'1'),ComplexQuery([Query(None,'2'),Query(None,'3')],operator='and')],operator='or')),
('1 OR 2 AND 3',ComplexQuery([Query(None,'1'),ComplexQuery([Query(None,'2'),Query(None,'3')],logical_operator='and')],logical_operator='or')),
('1 AND 2 3',ComplexQuery([Query(None,'1'),Query(None,'2'),Query(None,'3')],operator='and')),
('1 AND 2 3',ComplexQuery([Query(None,'1'),Query(None,'2'),Query(None,'3')],logical_operator='and')),
('1 2 AND 3',ComplexQuery([Query(None,'1'),Query(None,'2'),Query(None,'3')],operator='and')),
('1 2 AND 3',ComplexQuery([Query(None,'1'),Query(None,'2'),Query(None,'3')],logical_operator='and')),
('10 11 AND 12 13',ComplexQuery([Query(None,'10'),Query(None,'11'),Query(None,'12'),Query(None,'13')],operator='and')),
('10 11 AND 12 13',ComplexQuery([Query(None,'10'),Query(None,'11'),Query(None,'12'),Query(None,'13')],logical_operator='and')),
('1 OR 2 3',ComplexQuery([Query(None,'1'),ComplexQuery([Query(None,'2'),Query(None,'3')],operator='and')],operator='or')),
('1 OR 2 3',ComplexQuery([Query(None,'1'),ComplexQuery([Query(None,'2'),Query(None,'3')],logical_operator='and')],logical_operator='or')),
('1 2 OR 3',ComplexQuery([ComplexQuery([Query(None,'1'),Query(None,'2')],operator='and'),Query(None,'3')],operator='or')),
('1 2 OR 3',ComplexQuery([ComplexQuery([Query(None,'1'),Query(None,'2')],logical_operator='and'),Query(None,'3')],logical_operator='or')),
('10 11 OR 12 13',ComplexQuery([ComplexQuery([Query(None,'10'),Query(None,'11')],operator='and'),ComplexQuery([Query(None,'12'),Query(None,'13')],operator='and')],operator='or')),
('10 11 OR 12 13',ComplexQuery([ComplexQuery([Query(None,'10'),Query(None,'11')],logical_operator='and'),ComplexQuery([Query(None,'12'),Query(None,'13')],logical_operator='and')],logical_operator='or')),
('((1 AND 2 OR 3) OR (4 OR 5 6) OR (7 8 OR 9) OR (10 11 OR 12 13))',
('((1 AND 2 OR 3) OR (4 OR 5 6) OR (7 8 OR 9) OR (10 11 OR 12 13))',
('title:(Paul Jean OR Lili)',ComplexQuery([Query('title','Paul'),Query('title','Jean'),Query('title','Lili')],operator='or')),
('title:(Paul Jean OR Lili)',ComplexQuery([Query('title','Paul'),Query('title','Jean'),Query('title','Lili')],logical_operator='or')),
('title:Paul Jean OR Lili',ComplexQuery([ComplexQuery([Query('title','Paul'),Query(None,'Jean')],operator='and'),Query(None,'Lili')],operator='or')),
('title:Paul Jean OR Lili',ComplexQuery([ComplexQuery([Query('title','Paul'),Query(None,'Jean')],logical_operator='and'),Query(None,'Lili')],logical_operator='or')),