def test_not_between(self): filter = TimeFilter(Person.start_time) filter.set('!between', '9:00 am', '5:00 pm') self.assert_filter_query( filter, "WHERE persons.start_time NOT BETWEEN CAST('09:00:00.000000' AS TIME) AND " "CAST('17:00:00.000000' AS TIME)")
def test_not_empty(self): filter = TimeFilter(Person.start_time) filter.set('!empty', None) self.assert_filter_query(filter, "WHERE persons.start_time IS NOT NULL")
def test_gte(self): filter = TimeFilter(Person.start_time) filter.set('gte', '10:15 am') self.assert_filter_query(filter, "WHERE persons.start_time >= CAST('10:15:00.000000' AS TIME)")
def test_lte(self): filter = TimeFilter(Person.start_time) filter.set('lte', '9:00 am') self.assert_filter_query(filter, "WHERE persons.start_time <= CAST('09:00:00.000000' AS TIME)")
def test_not_eq(self): filter = TimeFilter(Person.start_time) filter.set('!eq', '11:30 pm') self.assert_filter_query(filter, "WHERE persons.start_time != CAST('23:30:00.000000' AS TIME)")