def test__moreThanRelativeDate(self): days = 2 now = DateTime() mydate = now - days expected_dates = [mydate.earliestTime(), now.latestTime()] expected = {'modified': {'query': expected_dates, 'range': 'minmax'}} data = Row(index='modified', operator='_moreThanRelativeDate', values=days) parsed = queryparser._moreThanRelativeDate(MockSite(), data) self.assertEqual(parsed, expected)