Example #1
0
 def test_time_grain_blacklist(self):
     blacklist = ["PT1M"]
     time_grains = {"PT1S": "second", "PT1M": "minute"}
     time_grain_functions = {"PT1S": "{col}", "PT1M": "{col}"}
     time_grains = create_time_grains_tuple(time_grains,
                                            time_grain_functions, blacklist)
     self.assertEqual(1, len(time_grains))
     self.assertEqual("PT1S", time_grains[0].duration)
Example #2
0
 def test_time_grain_blacklist(self):
     blacklist = ['PT1M']
     time_grains = {
         'PT1S': 'second',
         'PT1M': 'minute',
     }
     time_grain_functions = {
         'PT1S': '{col}',
         'PT1M': '{col}',
     }
     time_grains = create_time_grains_tuple(time_grains,
                                            time_grain_functions, blacklist)
     self.assertEqual(1, len(time_grains))
     self.assertEqual('PT1S', time_grains[0].duration)