예제 #1
0
 def test__today(self):
     now = DateTime()
     expected_dates = [now.earliestTime(), now.latestTime()]
     expected = {'modified': {'query': expected_dates, 'range': 'minmax'}}
     data = Row(index='modified', operator='_today', values=expected_dates)
     parsed = queryparser._today(MockSite(), data)
     self.assertEqual(parsed, expected)
예제 #2
0
 def test__today(self):
     now = DateTime()
     expected_dates = [now.earliestTime(), now.latestTime()]
     expected = {'modified': {'query': expected_dates, 'range': 'minmax'}}
     data = Row(index='modified',
               operator='_today',
               values=expected_dates)
     parsed = queryparser._today(MockSite(), data)
     self.assertEqual(parsed, expected)