mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
7c6b95e71d
To avoid complications with how Google Auth works, when enabling organization multi-tenancy on a single instance, each organization becomes a "sub folder" instead of a sub-domain.
13 lines
651 B
Python
13 lines
651 B
Python
from tests import BaseTestCase
|
|
|
|
|
|
class TestDataSourceGetSchema(BaseTestCase):
|
|
def test_fails_if_user_doesnt_belong_to_org(self):
|
|
other_user = self.factory.create_user(org=self.factory.create_org())
|
|
response = self.make_request("get", "/api/data_sources/{}/schema".format(self.factory.data_source.id), user=other_user)
|
|
self.assertEqual(response.status_code, 404)
|
|
|
|
other_admin = self.factory.create_admin(org=self.factory.create_org())
|
|
response = self.make_request("get", "/api/data_sources/{}/schema".format(self.factory.data_source.id), user=other_admin)
|
|
self.assertEqual(response.status_code, 404)
|