27 lines
726 B
Python
27 lines
726 B
Python
from src.runner import Runner, Test
|
|
|
|
|
|
def condition_always_true(dotenv_config: dict[str, str]) -> bool:
|
|
return True
|
|
|
|
|
|
def condition_always_false(dotenv_config: dict[str, str]) -> bool:
|
|
return False
|
|
|
|
|
|
def condition_has_locale(dotenv_config: dict[str, str]) -> bool:
|
|
if "LOCALE" in dotenv_config:
|
|
if "de" in dotenv_config["LOCALE"]:
|
|
return True
|
|
return False
|
|
|
|
|
|
class RunnerWordpress(Runner):
|
|
name = "wordpress"
|
|
test_dir_name = "tests_wordpress"
|
|
dependencies = ["authentik"]
|
|
setups = [Test(test_file="setup_wordpress.py")]
|
|
tests = [
|
|
Test(test_file="test_wordpress.py"),
|
|
Test(condition=condition_has_locale, test_file="test_wordpress_localization.py"),
|
|
]
|