mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[SIP-15] Adding grace period (#8490)
This commit is contained in:
@@ -920,3 +920,18 @@ class UtilsTestCase(unittest.TestCase):
|
||||
)
|
||||
|
||||
self.assertIsNone(get_time_range_endpoints(form_data={}, slc=slc))
|
||||
|
||||
with app.app_context():
|
||||
app.config["SIP_15_GRACE_PERIOD_END"] = date.today() + timedelta(days=1)
|
||||
|
||||
self.assertEqual(
|
||||
get_time_range_endpoints(form_data={"datasource": "1__table"}, slc=slc),
|
||||
(TimeRangeEndpoint.INCLUSIVE, TimeRangeEndpoint.INCLUSIVE),
|
||||
)
|
||||
|
||||
app.config["SIP_15_GRACE_PERIOD_END"] = date.today()
|
||||
|
||||
self.assertEqual(
|
||||
get_time_range_endpoints(form_data={"datasource": "1__table"}, slc=slc),
|
||||
(TimeRangeEndpoint.INCLUSIVE, TimeRangeEndpoint.EXCLUSIVE),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user