From 90d34c64acb2c89118cda719e6ed7d62374b42d4 Mon Sep 17 00:00:00 2001 From: Noah Paige Date: Thu, 14 Sep 2023 15:22:10 -0400 Subject: [PATCH] Configure Pytests on Feature Flags --- tests/{modules => base}/test_loader.py | 0 tests/modules/datasets/test_dataset_location.py | 3 +++ 2 files changed, 3 insertions(+) rename tests/{modules => base}/test_loader.py (100%) diff --git a/tests/modules/test_loader.py b/tests/base/test_loader.py similarity index 100% rename from tests/modules/test_loader.py rename to tests/base/test_loader.py diff --git a/tests/modules/datasets/test_dataset_location.py b/tests/modules/datasets/test_dataset_location.py index d06cb9628..1e8ae0d98 100644 --- a/tests/modules/datasets/test_dataset_location.py +++ b/tests/modules/datasets/test_dataset_location.py @@ -1,6 +1,7 @@ from unittest.mock import MagicMock import pytest +from dataall.base.config import config from dataall.modules.datasets_base.db.dataset_models import Dataset @pytest.fixture(scope='module') @@ -10,6 +11,7 @@ def dataset1(env_fixture, org_fixture, dataset, group) -> Dataset: ) +@pytest.mark.skipif(not config.get_property("modules.datasets.features.file_actions"), reason="Feature Disabled by Config") def test_create_location(client, dataset1, user, group, patch_es, module_mocker): mock_client = MagicMock() module_mocker.patch("dataall.modules.datasets.services.dataset_location_service.S3LocationClient", mock_client) @@ -39,6 +41,7 @@ def test_create_location(client, dataset1, user, group, patch_es, module_mocker) assert 'test' in response.data.createDatasetStorageLocation.tags +@pytest.mark.skipif(not config.get_property("modules.datasets.features.file_actions"), reason="Feature Disabled by Config") def test_manage_dataset_location(client, dataset1, user, group): response = client.query( """