tests: added fixtures to created dashboards and updated test with proper value (#11290)

* Added fixtures for hidden and published dashboards. Added fixture to restore copied dashboard in dashboard tests. Changed number of dashboards in datasets/api_tests.py because copied dashboard is removed.

* Changed number of dashboards in database api tests after cleanup of dashboards in dashboards_tests
This commit is contained in:
Kasia Kucharczyk
2020-10-20 00:07:26 +02:00
committed by GitHub
parent 55c2892e9b
commit 0e97c4f66c
3 changed files with 69 additions and 35 deletions

View File

@@ -24,7 +24,6 @@ import pytest
import yaml
from sqlalchemy.sql import func
import tests.test_app
from superset.connectors.sqla.models import SqlaTable, SqlMetric, TableColumn
from superset.dao.exceptions import (
DAOCreateFailedError,
@@ -1019,7 +1018,7 @@ class TestDatasetApi(SupersetTestCase):
self.assertEqual(rv.status_code, 200)
response = json.loads(rv.data.decode("utf-8"))
self.assertEqual(response["charts"]["count"], 18)
self.assertEqual(response["dashboards"]["count"], 2)
self.assertEqual(response["dashboards"]["count"], 1)
def test_get_dataset_related_objects_not_found(self):
"""