Exemple #1
0
 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)")
Exemple #2
0
 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)")
Exemple #3
0
 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")
Exemple #4
0
 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)")
Exemple #5
0
 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)")
Exemple #6
0
 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)")
Exemple #7
0
 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")
Exemple #8
0
 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)")
Exemple #9
0
 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)")
Exemple #10
0
 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)")