We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32cef44 commit 6be5135Copy full SHA for 6be5135
tests/tasks/test_refresh_schemas.py
@@ -1,5 +1,6 @@
1
from mock import patch
2
3
+from redash import settings
4
from redash.tasks import refresh_schemas
5
from tests import BaseTestCase
6
@@ -23,3 +24,11 @@ def test_skips_paused_data_sources(self):
23
24
with patch("redash.tasks.queries.maintenance.refresh_schema.delay") as refresh_job:
25
refresh_schemas()
26
refresh_job.assert_called()
27
+
28
+ def test_skips_excluded_datasource_types(self):
29
+ ds = self.factory.data_source
30
31
+ with patch.object(settings, "SCHEMAS_REFRESH_EXCLUDED_TYPES", {ds.type}):
32
+ with patch("redash.tasks.queries.maintenance.refresh_schema.delay") as refresh_job:
33
+ refresh_schemas()
34
+ refresh_job.assert_not_called()
0 commit comments