mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Override the role with perms for give datasources. (#1335)
* Override the role with perms for give datasources. * Address comments.
This commit is contained in:
@@ -20,8 +20,8 @@ cli = imp.load_source('cli', BASE_DIR + "/bin/caravel")
|
||||
|
||||
|
||||
class CaravelTestCase(unittest.TestCase):
|
||||
requires_examples = False
|
||||
examples_loaded = False
|
||||
requires_examples = True
|
||||
examples_loaded = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
if (
|
||||
@@ -119,6 +119,15 @@ class CaravelTestCase(unittest.TestCase):
|
||||
session.expunge_all()
|
||||
return slc
|
||||
|
||||
def get_table_by_name(self, name):
|
||||
return db.session.query(models.SqlaTable).filter_by(
|
||||
table_name=name).first()
|
||||
|
||||
def get_druid_ds_by_name(self, name):
|
||||
return db.session.query(models.DruidDatasource).filter_by(
|
||||
datasource_name=name).first()
|
||||
|
||||
|
||||
def get_resp(self, url):
|
||||
"""Shortcut to get the parsed results while following redirects"""
|
||||
resp = self.client.get(url, follow_redirects=True)
|
||||
|
||||
Reference in New Issue
Block a user