def test__equal(self): data = Row(index='modified', operator='_equal', values='2010/03/18') parsed = queryparser._equal(MockSite(), data) expected = {'modified': {'query': '2010/03/18'}} self.assertEqual(parsed, expected) data = Row(index='modified', operator='_equal', values=['2010/03/18', '2010/03/19']) parsed = queryparser._equal(MockSite(), data) expected = {'modified': {'query': ['2010/03/18', '2010/03/19']}} self.assertEqual(parsed, expected)
def test__equal(self): data = Row( index='modified', operator='_equal', values='2010/03/18' ) parsed = queryparser._equal(MockSite(), data) expected = {'modified': {'query': '2010/03/18'}} self.assertEqual(parsed, expected) data = Row( index='modified', operator='_equal', values=['2010/03/18', '2010/03/19'] ) parsed = queryparser._equal(MockSite(), data) expected = {'modified': {'query': ['2010/03/18', '2010/03/19']}} self.assertEqual(parsed, expected)