'test case to check between filter for date fields'

def test_between_filters(self):

    frappe.db.sql(u'delete    from    tabEvent')
    todays_event = create_event()
    event = create_event(starts_on=u'2016-07-06    12:00:00')
    data = DatabaseQuery(u'Event').execute(filters={u'starts_on': [u'between', None]}, fields=[u'name'])
    self.assertTrue(({u'name': todays_event.name} in data))
    self.assertTrue(({u'name': event.name} not in data))
    data = DatabaseQuery(u'Event').execute(filters={u'starts_on': [u'between', [u'2016-07-05    12:00:00', u'2016-07-07    12:00:00']]}, fields=[u'name'])
    self.assertTrue(({u'name': event.name} in data))
    self.assertTrue(({u'name': todays_event.name} not in data))
    data = DatabaseQuery(u'Event').execute(filters={u'starts_on': [u'between', [u'2016-07-05    12:00:00']]}, fields=[u'name'])
    self.assertTrue(({u'name': todays_event.name} in data))
    self.assertTrue(({u'name': event.name} in data))
