'Ensure that Q-objects correctly OR together.'

def test_or_combination(self):

    class TestDoc(Document, ):
        x = IntField()
    q1 = Q(x__lt=3)
    q2 = Q(x__gt=7)
    query = (q1 | q2).to_query(TestDoc)
    self.assertEqual(query, {'$or': [{'x': {'$lt': 3}}, {'x': {'$gt': 7}}]})
