mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[hotfix] fix the logging fix that broke the build (#1940)
* [hotfix] fix the logging fix that broke the build * Fixing tests
This commit is contained in:
committed by
GitHub
parent
5d94d7067e
commit
2d866e3ffa
@@ -59,16 +59,20 @@ class CoreTests(SupersetTestCase):
|
||||
'/superset/slice/{}/?standalone=true'.format(slc.id))
|
||||
assert 'List Roles' not in resp
|
||||
|
||||
def test_endpoints_for_a_slice(self):
|
||||
def test_slice_json_endpoint(self):
|
||||
self.login(username='admin')
|
||||
slc = self.get_slice("Girls", db.session)
|
||||
|
||||
resp = self.get_resp(slc.viz.json_endpoint)
|
||||
assert '"Jennifer"' in resp
|
||||
|
||||
def test_slice_csv_endpoint(self):
|
||||
self.login(username='admin')
|
||||
slc = self.get_slice("Girls", db.session)
|
||||
|
||||
resp = self.get_resp(slc.viz.csv_endpoint)
|
||||
assert 'Jennifer,' in resp
|
||||
|
||||
resp = self.get_resp(slc.viz.json_endpoint)
|
||||
assert '"Jennifer"' in resp
|
||||
|
||||
def test_admin_only_permissions(self):
|
||||
def assert_admin_permission_in(role_name, assert_func):
|
||||
role = sm.find_role(role_name)
|
||||
@@ -466,6 +470,7 @@ class CoreTests(SupersetTestCase):
|
||||
|
||||
def test_table_metadata(self):
|
||||
maindb = self.get_main_database(db.session)
|
||||
backend = maindb.backend
|
||||
data = self.get_json_resp(
|
||||
"/superset/table/{}/ab_user/null/".format(maindb.id))
|
||||
self.assertEqual(data['name'], 'ab_user')
|
||||
@@ -473,7 +478,6 @@ class CoreTests(SupersetTestCase):
|
||||
assert data.get('selectStar').startswith('SELECT')
|
||||
|
||||
# Engine specific tests
|
||||
backend = maindb.backend
|
||||
if backend in ('mysql', 'postgresql'):
|
||||
self.assertEqual(data.get('primaryKey').get('type'), 'pk')
|
||||
self.assertEqual(
|
||||
|
||||
Reference in New Issue
Block a user