From 02b29b3bc413f0daac1684c6ab5d6f8e25e48c9e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 17 Dec 2025 12:12:36 +0100 Subject: [PATCH] Removed legacy tests --- tests/legacy/README.md | 5 --- tests/legacy/__init__.py | 0 tests/legacy/test_get_docker_paths.py | 47 --------------------------- 3 files changed, 52 deletions(-) delete mode 100644 tests/legacy/README.md delete mode 100644 tests/legacy/__init__.py delete mode 100644 tests/legacy/test_get_docker_paths.py diff --git a/tests/legacy/README.md b/tests/legacy/README.md deleted file mode 100644 index 4f32fe95..00000000 --- a/tests/legacy/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Legacy Tests - -This are tests which had been written for old code, but which had been modified to test restructured new code. - -They shouldn't have high impacts on the stability of the system and propably could be deleted. \ No newline at end of file diff --git a/tests/legacy/__init__.py b/tests/legacy/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/legacy/test_get_docker_paths.py b/tests/legacy/test_get_docker_paths.py deleted file mode 100644 index 02d787ca..00000000 --- a/tests/legacy/test_get_docker_paths.py +++ /dev/null @@ -1,47 +0,0 @@ -import unittest -import sys -import os - -sys.path.insert( - 0, - os.path.abspath( - os.path.join(os.path.dirname(__file__), "../../") - ), -) - -from filter_plugins.get_app_conf import AppConfigKeyError, get_app_conf - -def is_feature_enabled(applications: dict, feature: str, application_id: str) -> bool: - """ - Wrapper for compatibility: Return True if applications[application_id].features[feature] is truthy. - """ - return bool(get_app_conf(applications, application_id, f"features.{feature}", strict=False)) - - -class TestConfigurationFilters(unittest.TestCase): - def setUp(self): - # Sample applications data for testing - self.applications = { - 'app1': { - 'features': { - 'oauth2': True, - }, - }, - 'app2': { - # no features or csp defined - }, - } - - # Tests for is_feature_enabled - def test_is_feature_enabled_true(self): - self.assertTrue(is_feature_enabled(self.applications, 'oauth2', 'app1')) - - def test_is_feature_enabled_false_missing_feature(self): - self.assertFalse(is_feature_enabled(self.applications, 'nonexistent', 'app1')) - - def test_is_feature_enabled_false_missing_app(self): - with self.assertRaises(Exception): - is_feature_enabled(self.applications, 'oauth2', 'unknown_app') - -if __name__ == '__main__': - unittest.main() \ No newline at end of file