Example #1
0
def test_time_grain_denylist():
    config = app.config.copy()
    app.config["TIME_GRAIN_DENYLIST"] = ["PT1M"]

    with app.app_context():
        time_grain_functions = SqliteEngineSpec.get_time_grain_expressions()
        assert not "PT1M" in time_grain_functions

    app.config = config
Example #2
0
 def test_time_grain_denylist(self):
     with app.app_context():
         app.config["TIME_GRAIN_DENYLIST"] = ["PT1M"]
         time_grain_functions = SqliteEngineSpec.get_time_grain_expressions(
         )
         self.assertNotIn("PT1M", time_grain_functions)